Women did serve in the Buffalo Soldier regiment, but not legally.
However, there was a woman named Cathay Williams—a former slave from Independence, Missouri—who secretly served as soldier William Cathay for two years during the Civil War.
When she fell ill in 1868, she was discovered and discharged.
She later opened a boarding house in Raton, New Mexico, which was a frequent stopping point for General Phil Sheridan.