Suppose that, under the Articles of the Hague Convention ( 1907 ) there were provisions restricting the basing of military units in a 3rd party country, other than those of co-belligerents during declared hostilities or for purposes of occupation. The restrictions cold specify a minimum %age of manpower ( say 80% ) within a military unit which must be citizens of the host country, and that any hardware must be owned by the host nation and carry its markings. This would have prevented, for example, the USAF basing squadrons in Britain and certain European countries after WW2.
However, to work around these restrictions, the hardware could be nominally leased to the host country and painted up in its markings, and as long as 80% of the men involved are from the host country ( or at least possessing a passport from that country to show that they are 'citizens' - easy enough to sort out on a temporary basis ) things would be OK.
Barred from basing units in the UK during the cold war, in the 1950s a number of USAF aircraft were transferred to RAF ownership, including the Boeing B-47 StratoJet depicted here. Changes to the basic US version were limited to the fitment of compatible radio equipment, the ability to carry some UK weapons ( e.g. Red Beard ) and the addition of a refuelling probe.