Yes, the rule-of-thumb assumes a free field and some other things (like a point source). Even in a room, though, it is still a useful construct to consider, I think. The reverberant sound level and ambient noise are more-or-less constant everywhere in the room, so the relationship between the direct sound and distance still holds and, as you decrease the distance, you are increasing the proportion of direct sound recorded by an estimable quantity. The point source assumption may be a bigger issue, with repeaters and line arrays and whatnot. At least as I understand it...
In any event, the relationship between distance and sound pressure levels is not "inverse square" but just "inverse" (SPL is proportional to 1/r).