gender ?

at 18 weeks whatever the doctor tells you the sex of the baby is , is correct right ? my ultrasound tech told me we could find out at 16 weeks but my next appointment isnt until the end of november , I will be 18 weeks by then