Absolutely you can, per USAG. The ONLY rule the USAG has about hair is that is should be secured back from the face as to not obscure vision. While individual gyms may set different requirements, luckily my gym does not. My daughter has short hair and just clips it back off her face.
Unless the rules have changed, yes, pony tails are allowed. I have seen all kinds of hair styles through the years including many long pony tails. I don't know if it's a specific rule but for safety purposes it is best to make sure the hair is up high/back enough as too not hit the equipment or swing into the gymnast's face.
Having said that, every gym is different and some require specific hair styles to be uniform, like buns.
Every gym is different. One of my girl's gym didn't care as long as it was neat and would not get caught on anything. So, braids, ponytails, buns were all acceptable. My other daughter's gym required high buns until they realized that she had so much hair it would not stay no matter what we did. She competed with a high pony as a result.
My gyms rule was that your hair cannot touch the floor in a handstand so if you have long hair in a pony tail and it touches the floor in handstand then it has to be in a bun or something. The next “test” if you wanted a pony tail was if you could grab the pony tail and bring the hair around your head to touch your face then your hair was too long for a competition pony tail.