Yes they can, but it depends on the quality of the equipment and the skill of the person reading the scan. My doctor, (am in Singapore) has amazing equipment as well as an incredible ability to read scans. We were told at 12 weeks that it was 90% certain to be a boy and this was confirmed at 14 weeks, and then again at 20 weeks when the genitals were clearly visible. Whilst the genitals aren't fully developed at 12 weeks, I think there is a certain technique doctors use which relates to the angle of the 'genital nub'. Apparently if the doctor/sonographer knows how to do this, it's a very accurate way of predicting sex at an early stage.
(interestingly my acupuncturist also correctly predicted the sex at 8 weeks, according to my pulse! It's one of several bodily 'pulses' in Chinese medicine, and mine was stronger on one side than the other, left or right wrist, I can't remember which, and this was an indicator of the baby being a boy! She correctly predicted my friend's baby too with this method, as a girl)