How would a modern doctor perform routine ultrasound and not know the sex of the baby? The doctor will know and he should ask them if they want to know (if they can't tell from the ultrasound).
Depends on how the baby's position is in the womb. If you see a penis, then it's clear: a boy. But if you don't see one, it could mean a girl but could be a boy as well because in some cases due to the positioning of the baby the penis could be hidden.