That can be achieved pretty easy within Mendix.
Though is captured in a different way than your approached. Its not depending on two different roles and the combination with data. But is should be captured in a single role with the right data structure.
You should have a datastructure/domain model in place which matches the idea of this domain model
A facility, with data referencing that Facility. I added a single entity, but that could be also attributes inside the entity Facility and or many other entities related to the Facility.
The User is assigned one or more Facilities using a association
On security level; you can add a module role facility manager with access to all dat if it matches the constraint:
In this scenario a user can only access the facility data if it associated with the account of the logged in user
I do not completely follow your question, but in general: you could create a (non-persistent) helper entity to manage some more advanced visibilities based on both data access and your role.
Create for example an entity “VisibilityHelper” having an boolean attribute “Show”. Create an object using a datasource microflow having your custom logic and use this on your page inside a dataview. Put the button you want to give conditional visibility inside this dataview and select the conditional visibility and set it on the Show boolean.
Hopefully this helps a bit!