The URL filtering should work as intended.
As per the below doc, the example provided matches what you're trying to achieve
Content Filtering - Cisco Meraki
I just performed a quick test of the URL filtering with a group policy and it seemed to work correctly.
It took a few minutes to apply but once applied it worked as intended.
Potentially existing flows through the MX won't be blocked so you might have to reboot the device for that.
As you indicated, the other way to do it is to create an L3 firewall rule to allow access only to the known public IP and deny all other traffic. This requires the public IP being relatively static but will end up being a 'stricter' policy than just URL filtering.