Yes, it's possible in the normal way ...
I tested this and it blocks entry from N or ENTER (assuming both at between inside and outside in the connection table):
block_building : block_path {
block_when_not = is_has_given_oracle_something
from = outside_building
to = inside_building
message = Oracle Prevents
}