Your school sounds so unreasonable. I was only pregnant while still in school but they let me go in two hours late every day because I was always tired and emotionally really screwed over. Why should it be any different than if your family was taking a vacation? As long as you keep up with the work, they should work with you.
I'm glad that your LO is doing good, hopefully she is ready to come home very soon!
My school doesn't approve of taking time out of school for a vacation either. If you miss more than 2 days in a row you need a documented reason that has to meet their other criteria. They can't stop you from taking the time off, but they can give you incomplete grades. They don't really seem to count just keeping up with the work as fully participating in class.
I go to a private prep school. They are pretty strict about missing classes. Technically a teacher is allowed to fail you if you miss 9 classes in a single course, but I don't think it's actually been done before. They all pity me now, the teachers and counselors and stuff.