K.N.
She is not too young for ballet at all. At this age it is not a structured dance class, it's more learning through games. At least this is what goes on in my daughters class. They have moves called "the mermaid walk" and "good toes, naughty toes". They learn the moves in a way that is fun for thier age.
As far as her leaving the class room, I would just make a simple rule that she can not leave the class unless she is ready to go home, and stick to it. If she doesn't want to participate, have the teacher show her a spot inside the room where she can sit and wait until she is ready to join the others again. If she does leave the room don't let her go back in, go home, since that is the rule. She'll get the idea quickly. This is what I did with my daughter and she still chooses to sometimes sit in her spot and watch for part of the class but she NEVER comes out to be with brother, baby, and I. It sounds like you have a very understanding and patient teacher, yippie.
The times parents are allowed in to watch my daughters ballet class (last day of the session is parents day) I am amazed at the teacher and how she handles between 6 to 8 little girls that range in age from 3 to 4 years old. Really at this age do any of them "appreciate" directions. LOL!! As long as she is enjoying herself let her keep going. Enjoy