Is there a general term for a military officer serving "on loan", so to speak, with another military branch or another nation's military forces?
As an example, say that country A and country B are conducting a joint military exercise, and one of A's officers joins one of B's units to facilitate communication or offer advice.
Another example would be the installation of Soviet "military advisors" in communist countries that commonly occurred during the Cold War.