Can you use the iPhone GPS in flight on an airplane to track your position?

If so, do airlines allow it?

If your phone uses a true GPS, and yes, many phones do have that, you can use it for tracking your position.
GPS only uses incoming signals, no outgoing ones.

If your phone uses Internet for GPS services, you can only do it in flight and only when the airline allows it. (And only when you have Wi-Fi in the plane I would guess.)

No. Cellphones do not have true gps. While they use the satellites to get your position, smartphones typically do not have all of the maps loaded onto the phone. Therefore, an internet connection is almost always required while using gps. If your flight has Wi-Fi, it would work however Wi-Fi usually costs about 10 per flight

Can, maybe. Airplanes are good Farraday cages, except for the windows.

May, no.