A generation ago, schoolchildren caught fighting in the corridors, sassing a teacher or skipping class might have ended up in detention. Today, there’s a good chance they will end up in police custody.

Stephen Perry, now 18 years old, was trying to avoid a water balloon fight in 2013 when he was swept up by police at his Wake County, N.C., high school; he revealed he had a small pocketknife and was charged with weapons possession. Rashe France was a 12-year-old seventh-grader when he...