Can I pass a query into the consequence of a rule?

For a search index I’m making for a client I have records that can have a status of either ‘Online’, ‘Not Visible’, or ‘Admin Only’.

Whenever a record has a status of ‘Online’, it needs to show at all times, when it is ‘Not Visible’ it needs to be hidden for the result unless another searchable attribute library_id matches exactly. Lastly, the ‘Admin Only’ status shows all records but only if the user is an admin.

Showing only ‘Online’ results or ‘Admin Only’ (all results) is not an issue, as I can pass a default facet based on login status and set that as a filter in the configure widget:

configure( {
	filters: filter_string,
	hitsPerPage: 36,
} ),

(filter_string can be status:Online or status:"Admin Only" OR status:"Not Visible" OR status:Online depending on whether or not the user is an admin)

However, I want to be able to show results that have status:"Not Visible" whenever the query exactlly matches their library_id and the user is not an admin user (so when the results are filtered to status:Online).

I tried to do this with a Rule like maybe pinning a result to the top when the query matches it’s library ID, but either there’s no way to pass the query into the consequence, or I’m missing it completely. I was hoping for a way to dynamically do this, as the index has thousands of records and saving them each as individual rules seems counter intuitive.

Maybe I’m looking at the wrong place and I can’t do this with rules?

Is there another way to unfilter results for specific queries?