Airlines from countries other than the USA aren't required to abide by US law when not operating inside the USA.
So an airline flying over Iran that isn't a US registered company isn't bound by FAA rules UNLESS their country of origin chooses to itself issue a regulation that copies that FAA rule (or a regulation that states that all FAA rules are to be complied with).
Many countries will generally follow the FAA when it comes to safety regulations and sometimes other things, but that often takes some time and is far from universal.
And of course in the shooting down of a Ukrainian airliner over Iran it was an aircraft on a direct flight between Iran and Ukraine, an airline that was probably in Iran at the time the FAA decided to ban overflight for US owned aircraft.