The intended way to integrate Quasar into another framework is the UMD version, you would have a really hard time integrating the ESM version, because you need to create the build process by yourself (which totaly is possible, you could take a look at the webpack config Quasar uses) and you can not easily updated.
The ESM version is intended for SPAs (I count PWAs and ELectron / Cordova as a subset of them). So you would have a standalone Quasar setup and communicate with Rails only via HTTP messages (your Rails app would only be an API).