IIRC, in SHE WORE A YELLOW RIBBON, one of the cavalry troopers under Wayne’s command is a former Confederate officer.
This was a common thing in a lot of Westerns.
There were a lot of ex-Confederate cavalry members on John Ford’s trilogy.
Along with Irishmen.