Can macOS be run as a container machine on macOS?

Yes

Yep. For a few years. And they keep enhancing it too.

It’s the only legal way to do so, due to the software license on MacOS.