Hello and hope you are doing well.
It is safe to fly with a ruptured ear drum. There are tubes called ‘Eustachian tubes’ which connect the middle ear to the throat, this balances the air pressure in the ears. With tympanic membrane perforation, the air can move into and out of the middle through the hole without relying on the eustachian tube, so the discomfort is actually less for a perforated ear than a normal ear. Ensure to see that the infection is adequately controlled.
Hope this helped and do keep us posted.