Depends...there's a LONG history of US citizens serving in foreign militaries. Some have done it while still members of the US military, either as 'deserters' or with a 'wink and a nod' from the US govt.
Look at the number of military veterans that have volunteered to serve with Ukraine's...