Dedupe works like this as it's written up on the linked page I shared:
dedupe considers files to be identical if they have the same file path and the same hash. If the backend does not support hashes (e.g. crypt wrapping Google Drive) then they will never be found to be identical. If you use the --size-only flag then files will be considered identical if they have the same size (any hash will be ignored). This can be useful on crypt backends which do not support hashes.
So a duplicate would be two of the same files in A.
If a the same file was in A and in B, that's not a duplicate.
one possible workaround is to use rclone mount, which makes cloud storage appear as a local folder.
then use any dedupe tool you would use for local on that mount.
if you are worried about having to download the files to calculate the hashes, you can use a free/cheap virtual machine from google cloud.
for google cloud compute virtual machines, there are not ingress/egress fees to access gdrive. https://cloud.google.com/vpc/network-pricing#egress-to%20service
I have access to a Windows pc and a Linux machine as well so I’m not tied to Mac. If you have no recommendations or experiences with dedupe tools then that’s fine too.