Yes, for a moonrise over a landscape, that's exactly right.
In the example of a poorly lit room with sunlight streaming through the window, the easiest solution is to add some fill lighting so the dynamic range of the shot isn't more than the camera sensor can handle.
Then think of dusk being nature's version of fill lighting, but on a really big scale. Sometimes it's the filtered light from a setting sun that you'll want, sometimes it's the diffuse light leftover just as the sun dips past the horizon. For a few minutes, it gives you an opportunity to equalize the DR between the moon and landscape. Random examples from a google search
here and
here.
By the time midnight rolls around, it's almost impossible to capture the moon in relief and sharp focus in the same shot as properly exposed clouds (or whatever). In my experience, the only solution then is to try to bracket exposures and stitch together the correctly exposed parts via HDR, but that isn't going to happen if your shutter speed is measured in seconds.