Yes, this is possible.
Pulling metrics out of Dynatrace can be done with the Metrics API:
Depending on the type of host, there may be a different metric that is used for CPU or Memory, but all Host/Infrastructure metrics are listed here:
Now as for grabbing all host metrics that serve a particular RUM Application, that requires a bit of configuration. You'll either want to tag each host with the name of the application it serves, or create a management zone for them. After that, you can include the tag/management zone as a filter in your request to just pull those hosts.
The below requests should give you the results you want after you set up your tag or management zone (replace X with your tag/management zone name or change the metricSelector metric ID if you want to pull a different metric):