I'm assuming you want the question answered for "standard" macOS applications, and not only for a very specific subset such as only X11-based software:
The only remote control server built-in to macOS is based on the VNC protocol - essentially transferring a graphical image to the client (i.e. as opposed to for example X11, where it is possible to transfer mere "descriptions" instead of their bitmapped outcomes).
However, the built-in server is not limited to "mirroring" as you seem to indicate. For example, with the Apple Remote Desktop client, you can enable something named "Curtain Mode". Essentially this lets the display on the server only show a message stating that the computer is locked, while the remote client is able to interact with the user interface.
The built-in server does support a dual monitor setup, so it is possible to remote control built monitors on a Mac with two monitors. However, I do not believe it is possible to configure such a setup "virtually" (i.e. with hardware).
One way of solving your use case of a head-less Mac server with dual-displays is to buy dummy HDMI dongles that mimic a connected display. Add two of these to the laptop so that you see 3 displays in your System Preferences. Connect the laptop to a charger, so that it doesn't go to sleep, and you should be able to close it up and have it still be running with 2 "virtual" displays while the internal display is turned off. Connecting to it remotely via VNC will allow you to control applications on those two "displays".
Third Party Solutions
If you look at third party solutions, it is indeed possible to run an RDP server on macOS:
An open source solution like Xrdp is probably not what you want, as it doesn't allow for remotely controlling ordinary macOS applications.
An alternative is available from NuoRDS with their NuoRDS Terminal server which add an RDP server to macOS. They support macOS 10.12 and later (including macOS 12 Monterey), and allow a non-mirrored mode. For example they allow multiple users to connect to the same remote Mac at the same time while working with different applications. However, as far as I see, they do not describe in their documentation whether you can have 2 virtual displays on the remote Mac.
Another alternative is to look at products from Aqua Connect. Their Ignision Server adds an RDP server to macOS. They also have a Terminal Server product that works for macOS 10.9 and older (i.e. recent versions of macOS are not supported). Unfortunately it looks like there hasn't been any real development on the software for a number of years, so it might not work at all on recent macOS. They do list being able to work in a non-mirrored mode, but they do not specifically address being able to use more displays than the remote computer has.
I do not use the NuoRDS or Aqua Connect solutions myself, so I cannot check whether the specific function of having 2 virtual displays on the remote Mac is supported. I would advise contacting their customer support for clarification before buying a license.