DALLAS—The pit bull, Athena, sniffed around desks and school backpacks on a recent day, looking for drugs as part of the city school district’s random spot checks. Just weeks before, the 11-month-old dog had been sitting in a nearby animal shelter, having arrived as a stray with bite wounds.

Pit bulls, a common name for some terriers and mixed-breed dogs that can often have a stocky, muscular build, are moving out of shelters and into jobs once reserved for other breeds—as police dogs. Animal Farm Foundation, a New York nonprofit...