It is up to end user agreement, after a certain time has passed the end user can do modifications freely.For foreign jets wouldn't you need OEM approval? That was my basis off saying it would be harder to do.
I think if they were willing to allow you to put your radar into another countries F-16s for example they would rather sell F-16V upgrades and make money.
Remember Israel trying to sell F-16s to Croatia?
"But Washington objected to the sale, apparently on the grounds that Israel’s upgrades made the planes more attractive to buyers than their American counterparts. It said Israel needed to strip off the upgrades made to the US-made jets, including electronic and radar systems."
For newer systems they are bound to permission of the manufacturer.