I think you would (almost) get what you want by using Focus on Duplicates.
As you can see I have 544 duplicate albums in My Library.
Of those duplicates only 25 albums are on Qobuz, all the rest is local storage
(in practice I have ripped my SACD collection, and I have added both the CDlayer and SACD layer (DSF format) to My local Library)
In principal (unless you manually override) Roon will make the album with the highest resolution the Primary Version
In my case, DSF files are the highest resolution compared to other albums in My Library , in your case AAC will be lower in resolution than Flac & Qobuz (and probably TIDAL ???)
So selecting an album to play will automatically select the highest resolution. In my case DSF format , in your case Flac (local & Qobuz & maybe Tidal)
3 examples :
Please note that in this 3rd example , I have manually set the DSD version as Primary, but still Roon will pick the highest resolution to play, in this case 192kHz/24bit
Assuming you have not added Tidal albums with lower resolution than AAC to your Library, you will automatically play the higher resolution for AAC albums with a Duplicate.
Next step you can take is selecting the AAC files that have no duplicate.
Unfortunately, you cannot double click on the Focus - Inspector - Duplicates to reverse it, so you need to make a few extra steps:
First select your AAC Duplicates (in my example I will use DSF):
I have now 225 albums.
I now Select All albums (top left)
Now add a new Tag to all selected albums, e.g. AAC No Duplicate
Please do NOT forget to save in the last step in order to apply the TAG to the albums.
You can check in ‘My Tags’ if the tag is correctly applied:
Now you can start all over (All albums) and Focus on this new TAG:
From here it really becomes a manual job if you want to check for higher resoluton versions in Qobuz/Tidal.
Just click on an album. The AAC album in My Mibrary will be presented, as well as any version available in Qobuz/Tidal. Pick the version that you like and Add to Library.
It will be set as Primary, and automaticaaly selected for playing as explained in the 1st part of this response.
I hope this is helpfull