The presence of three lines on an ultrasound image does not definitively indicate the sex of the baby. While often associated with a girl, the "3 lines" refer to the appearance of the labia, and this can also occur in boys due to the angle of the ultrasound image. If the lines are all in a row, it's more likely a girl, but it's not a guaranteed indicator.
The definitive way to determine the sex of a baby is through a later ultrasound when the genitals are more developed and clearly visible.