The legalities depend on the state, sometimes the county as well. In our area, foster parents must provide a single gender room. However, some nuclear families, due to space limitations, may have children of different genders in one room. In general, it really isn't a legal matter unless/until someone reports you for "questionable" behaviors.

As for co-sleeping, onset of puberty would probably strike most Americans as inappropriate. It is my observation that these days a lot depends on what is acceptable among their immediate peers plus most kids know to self-censure what they share by age 9. It is likely that your DS will outgrow this need on his own as long as he can just as easily go to his own room/bed and that option remains an attractive alternative with its own advantages.