As a Teacher it is her job to enforce the rules, and from her point of view you can see where keeping all students in class is important. If she makes a rule like that, and breaks it "once and a while," she doesn't enforce it well enough and it won't have the impact needed. Then again there is your specific situation where it is literally an "emergency" and you need to go. In this situation it is your problem and you did the same I would have. Is it against your human rights i don't think so because by being apart of the class you technically "agree" to the way she runs the class and she has the right to say yes or no. My advice would be let her know of your condition and there shouldn't be an issue. Worst comes to worst get a doctor's written note and prove it.