Can you have sex any which way when you're pregnant and not hurt the baby?

Yes. As long as you don't have pregnancy related issues like placenta previa or advanced cervical dilation. Check with your doc to see if you have any conditions that might preclude sex.