Alice you are quite right, for some that have been born as being Intersexed this is a condition that many Doctors share this information with babies’ parents as part of the process of deciding the most appropriate sex to assign.
It is sometimes later in life that the person may have a dissatisfaction with one’s assigned sex at birth.
Some of this has been taken from:-
Answers to Your Questions About Individuals With Intersex Conditions