To “rescue” a fallen ally, do you have to enter their 5′ square? [duplicate]

Apologies if this has been answered elsewhere, but I did spend a couple of hours researching this online and didn’t find anything definitve. I DM a campaign in which a party member has fallen unconscious and is about to start making death save rolls the following turn. A character (with flying in this particular example) wants to drag the ally out of the fray and then up to the roof for safety (they are fighting in a small open courtyard). I have seen a lot of opinion on the use of grappling for ally extraction as well as the action and movement economies to answer those related questions. However, right now I need to determine whether the rescuer will provoke an attack of opportunity when they extract the ally. Really, to me, it has come down to whether you are dragging an ally from your own square (and not within 5 feet of an enemy) or whether you have to enter their square in order to drag them.

Does carry vs drag change your answer? Does the ability to fly change your answer?