Had such a conflict occurred I suspect a good number of former Confederates may well have fought side by side with their former foe. As it was, Americans remained busy fighting 'at home' in the American Indian Wars. Needless to say, a good number of former Confederates were part of the US army during those numerous conflicts although, to the best of my limited knowledge, not usually in command positions.
That changed as time progressed. For example, in the Spanish-American War 1898 (
https://en.wikipedia.org/wiki/Spanish%E2%80%93American_War) who do we see in the list of American Commanders? None other than "Fighting Joe' Wheeler and Robert E. Lee's nephew and famed CSA cavalry commander, Fitzhugh Lee.
Fitzhugh Lee (centre of photograph)
Joseph Wheeler (in front, third from left)
As another personage in the second photograph would say: Bully! Bully!