A not-quite-exact example: my daughter's soccer league had a "stranded senior" rule. That had to do with age considerations, not gender, but the underlying point is relevant. This was a highly competitive league. (A fair number of the girls will play in college.) Suppose that the core of a team has been together since they were tadpoles. Everything is hunky-dory through U-17. Then half the team, the ones with early birthdays, graduates high school. The remaining players are stranded without a team. In that situation, and in that situation only, the league allows girls to play down a year in age. The point is to keep kids in the sport as long as they want to play.(And not handicap girls who want to play at the next level, who would be hurt by having to sit out a year.)
In the situation in the story, the school dropped the girls' team. Going forward, girls who want to play basketball will choose other schools. But what do you do with those caught in the transition? I would lean towards letting them play, if they're good enough to actually make the boys team (which will be unusual, but not extraordinarily rare in middle school). Let her play her last year. Going forward, the problem will not recur.