> 2.5.2 Apps [may not] download, install, or execute code which introduces or changes features or functionality of the app, including other apps.
The rule changed, I think around the time that Swift Playgrounds came out, to add:
> Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user.
There are probably plenty of apps that do interpret downloaded code (the Frotz app to play old text adventures comes to mind) and fly under the radar. But Apple would surely be on the lookout for any kind of emulator, due to the legal risk.