You’re not being dense. I was being too short. There’s a lot of relevant, unstated context here. I’ll try to fix some of that. Apologies in advance for the length.
Second question first: Anvil doesn’t have traditional multi-user SQL database “GRANT” statements. So “grant … access” has no built-in meaning, and there are no built-in functions to call to accomplish that. If you searched for “grant”, and didn’t find much that was useful, that’s probably why.
Anvil has its own, simpler, security model. See Building Secure Apps and Data Security.
For example, if the Client receives a row, and that row has a link to to some other row, then the Client can follow that link. (Whether you want them to be able to, or not, is a separate issue.) That row may contain its own links, so this can go on until you run out of links.
On the flip side, you get to design and build the architecture and behaviors you want to see, on top of Anvil’s. That includes any additional, app-specific security (access-control) behaviors, such as domain-name checks, and the recordkeeping you’ll need to support those behaviors.
In one approach, you add, to each row, a list of the domains that are allowed to access it. This would be an additional column in that table. The flip side is, you might have to update this column a lot.
In another approach, each domain gets its own table. This might be appropriate if each row is specific to a single domain.
In yet another, each domain gets a list of tables, whose rows it can access.
There’s no one-size-fits-all answer, no single “how do I do it” that’s good for every case. This really is something you should design yourself, to fit your specific context.