Both boys and girls start out with a sexual organ protruding out, maybe the scan was too early. Girls eventually it moves inward back into the body. Or perhaps the image on the screen wasn't very clear. So yes it's possible to make a mistake. Nothing is 100% until the baby is born. If you really want to know you can do the cell free testing where they draw your blood and can tell you with 99% accuracy of its a boy or girl.
Ask your doctor. There are a few tests that do the same, but most offices use only one. Most 35+ women are offered the test as a matter of course.
If you are concerned, the MaterniT21 test includes a dna based sex screening. It is 100% accurate at determining biological sex. Also, it can relieve any lingering fears about chromosomal issues.
My best friend's brother was told he was having a boy....she came out a girl