Is it possible to hurt the baby if I have sex while pregnant?

No. If your doctor has told you that you can have sex then you will not hurt the baby.
Very unlikely. Very unlikely but can be anatomically difficult. It also isn't recommended late in pregnancy. Your OB should be able to tell you all about it.