As long as you are not starting new exercise and do not let heart rate get too high and do not allow yourself to get too hot it is fine.
I stopped when I was preg as I was paranoid about a MC as had 1 previous so was doing everything possible to be careful even thought I knew I could continue.

I know people who have continued training and running etc right up until day before they give birth!!

Classes are great as instructors will tailor exercises to you.