The President is not non-military. The President is the Commander in Chief of the military. He is the boss.
I'm not sure what you mean by "non-military." Obviously he has some constitutional control over the nation's military, but he's not
in the military, and is thus not military personnel that is required or entitled to salute. Which is exactly why Eisenhower never saluted soldiers while in a presidential capacity, despite his previous stint as a five star general. It's also why John Kline, a 25 year veteran of the USMC, advised Reagan that it went against protocol for the President to return a salute.
There's nothing within the constitution or any federal law that I'm aware of that plainly states that the President is or is not "military personnel," so on its face, it seems like a somewhat murky area. However, the Department of Defense's directives state that military personnel are prohibited from sponsoring a political club, writing anything that solicits votes for a political cause, or speaking at any event that promotes a political movement. If the President were technically considered as being in the military simply because he's Commander In Chief, then he'd have issues running for re-election based on that prohibition.
There is federal case law, however, which states that the Secretary of War is a civilian position, not a military one, thus giving credence to the line of thought that an elected official serves in the capacity of a civilian, even if they have oversight or control of the military (United States v. Burns). And there is also federal case law which broadly states that ultimate control and oversight of the military is civilian in nature (Duncan v. Kahanamoku).
TL;DR - Just because the title "Commander In Chief" sounds military does not mean that the President is actually military personnel.Federal law has changed on saluting as a former military member or member not in uniform.
Only in instances involving the nation's flag and during the national anthem, neither of which are in play here.