Yes, it is possible to do this with occlusion queries. After creating your red buildings in PortaloTuris, check to see if they overlap with anything else.
PortaloTuris -->
primitiveCube
s(10,5,5)
color("#ff0000")
CheckPortaloTuris
CheckPortaloTuris -->
case overlaps():
NIL
else:
KeepBuilding
It's also possible to use labels. For example, if you want to only check if they occlude with the white buildings (and it doesn't matter if they occlude with other red buildings), then use a label in the occlusion query, and put a rule onto the white buildings which assigns the label.
const occluderLabel = "WhiteBuilding"
CheckPortaloTuris -->
case overlaps(inter, occluderLabel):
NIL
else:
KeepBuilding
// assign this rule to the white buildings
WhiteBuilding -->
label(occluderLabel)