Apple's hardware since the 2021 iPad Pro (with M1) has had the ability to do this. The iPads have the RAM (16gb on higher storage models), appropriate keyboard and trackpads, the works. Great hardware being held back by Apple's vision people weren't allowed to deviate from.
A straightforward reading of the DMA suggests that Apple is not allowed to restrict apps from using hardware features. Let's hope that means Parallels/VMware style VMs are possible without too much of a fight.