An airline will generally be charged differently if they offload pax at such a stop. For that reason, even if you are at a gate it is best to be prepared to be discreet.
As Celtic has been known to put it "A medical emergency is a lot of paperwork. How about I just get some fresh air to see if I feel better".