The answer is "maybe." Obviously had Ted Cruz chosen to live in Canada as a Canadian citizen, and had he been compelled into their Army and fought against us, it would certainly be difficult to argue that he's eligible to lead our country.
Treason sort of affects American Citizenship doesn't it?
No. Because US LAW says that anyone who joins the military forces of another nation loses their citizenship. US law governs US citizenship.
401(c) of the Nationality Act 1940, which reads:
A person who is a national of the United States, whether by birth or naturalization, shall lose his nationality by:
(c) Entering, or serving in, the armed forces of a foreign state unless expressly authorized by the laws of the United States, if he has or acquires the nationality of such foreign state...