It is possible … by using IP firewall on bridge. But then you need possibility to force all traffic between hosts A and B through router’s CPU … and that includes connecting hosts A and B to different router’s ether ports and disabling HW offload for at least one of those ports (preferably the one which carries less traffic from other LAN hosts connected to same port via some switch).
I’m not sure if you mean the feature of WiFi networks disabling one client communicating with another one directly… (default-forward in /interface wireless, forwarding in /interface wireless access-list).