Change role of users after deleting referred content via rules
I think i resolved it by using "fetch entity by property" and looking for the entity reference field that is equal to the current removed book.
Doing that create a list that you can iterate with the loop and inside this use actions to revoke roles.