It is indeed possible and was done routinely up until the late 70's and early 80's Although more often than not it was actually done when the infant was intersexed and had ambiguous genitalia since it is easier to fashion something internal than to make something which is external to the body.
The story about a circumcision accident sounds to me like a fiction - though there is one very famous case recorded which became something of a cause celebre for Dr John Money - whom I am ashamed to admit I actually knew on a personal (non professional) basis. He is not very well regarded in Trans circles these days... but I have a photo of my partner sitting on his knee at my very boozy 30th birthday party which he attended for various reasons.
It may be that your friend was told that it was an accident to prevent her parents from having to explain that she was actually intesexed.
Unsurprisingly, as gender Identity is actually mainly innate and not, as all the crazies want you to believe, programmed by nurture, reassigning at birth without being able to ask the baby what it felt it should be was not a great success - many of those so reasssigned rebel in later life and revert to what would have been their original gender.
Ironically although I was intersexed my gentialia, though small and hypospadias were not considered abnormal enough to have the benefit of this reassignment at birth - something which I would have killed for! Which all just goes to show that sometimes you are damned if you do and damned if you don't! Because I of course went on to have full SRS at the earliest possible moment once I became an adult.