I flew at 36 weeks with my second pregnancy. But my doctor had to check me right before and give a note. She only approved bc we had to relocate for a job and they told him he had to come then or the offer was off the table. I would not fly that late unless absolutely necessary.
My dr told me "oh no". I was bummed. But yea airlines wont let either..sorry
Believe any airlines if your within1 month of your due date they won't let you fly even with a doctor's note
Probably not the best idea.
Ask your doc though
check with the airlines too... they might not let you even if your doctor says its ok.