Ouch...this is a challenge! We had that same need and started downt the path to do it.
There is a really good article on how to do this at this link. It's a lot of steps and a lot of "moving parts". It works. We were able to implement it and had success.
However, we shortly abandoned it only becuase we then had need for more information beside which group they were in. In other words, just becuase they were in a particular group gave them certain access/functions in the PowerApp, but we also wanted to define other permissions within that group - which led to more groups and more confusion.
In the end, we created a SharePoint list and had all of the permission roles and sub roles defined in that. Then we just read that list upon start and determined functionality and access based on it.
I believe either way will get you there.