If school A has an agreement with school B to use their dorms, and that is available to all students at school A and not just athletes, there would be no problem. I assume this is the case, otherwise I don't see how that could even happen.
This is pretty much the case. For example, my alma mater (a fairly small school) is located in close proximity to four other schools with a similar profile. For efficiency, they have created a consortium that allows students at any one of those schools to use housing, dining areas, and most common facilities (as well as a certain number of credits per year at any school, with the home school's students getting priority.)
I won't discount the idea that an underpopulated school might allow general rental of its housing units--after all, they're going to sit empty and not generate any revenue if they don't. I think that security concerns would govern on that policy.