Most national FA rules didn't allow girls to compete with boys in organised football after about 12/13. The English FA have now upped the age limit to 18. The rule change was made mostly because there's not enough competition at the girls level yet in some parts of the country and the nearest (appropriate level) women's team might be a long/impossible trip by public transport.Yeah, no NBA rules prevents it. Also if I'm not mistaken FIFA doesn't prevent females from playing with males. But my experience is that at the MHSC academy girls weren't allowed to play with academy boys outside of the academy's grounds.
Women's teams sometimes play training matches against U16 boys academy teams. That's generally viewed as a matchup where the women get pushed to their physical (speed/strength) limits relatively safely and can work on their high speed passing/technique. The women only occasionally win those matches - but that's why they play them.