Watching the film, I was reminded of Jack London's classic novel White Fang, so unfairly categorized as a children's story even though the book (and the excellent 1991 film) used the dog as a character in a parable for adults.
The pursuit by the cavalry is one of several sequences in the film where animation frees chase scenes to run wild, as Spirit and his would-be captors careen down canyons and through towering rock walls, dock under obstacles and end up in a river. Spirit does not want to be broken, shod or inducted into the Army, and his salvation comes through Little Creek (voice of Daniel Studi), an Indian brave who helps him escape and rides him to freedom.