I really like the idea, as this would open up much more options for diplomacy:
Your friend is under attack? Make some of your troops serve as mercs for him under his command. (One should be able to restrict the allowed bidders.) If he is your friend, he will certainly give you the troops back...
I'm not sure if payment has to be made as much complicated as described below, though, but paying upkeep for your troops while they are away is certainly a necessity...