I've seen some cameras with a mode that tries to keep things level, along the lines of image stabilization. They work to some degree but what you're describing is unlikely to be in the video recorder, but something applied in post.
I have seen some plugins (in my browsing around) that can do the kind of isolation you describe, keeping the camera motion and even panning out of the framed area, but I haven't seen one that does it through a camera rotation. Might be out there, of course - never looked for anything like that!
I'd start looking at plugs for the video editing application you're using or ask on video-specific sites, and maybe ones specific to a particular app, or direct your question to one of the big plugin writers for your chosen editor. Or, if you see someone's video that does that, ask them!