Mine wore socks if she wanted to, didn't if she didn't want to. Sometimes she wore them with leggings, sometimes not. Sometimes she wore them with ballet flats, sometimes not. Sometimes she wore socks, leggings, and ballet flats all at the same time.
I really didn't care one way or the other.
BTW, I assume you are referring to causal wear and not dance wear.
The shoes ballet dancers wear are ballet slippers, not ballet flats. Socks with ballet slippers would make for some very clumsy dancing.
Ballet flats are a casual shoe for everyday wear.
Likewise, the leg coverings ballet dancers wear are called tights, not leggings. Tights are basically heavy-duty pantyhose. Socks over them, then feet stuffed into ballet slippers would be very uncomfortable.