You may type in the MAC address you want to allow or deny to access the router on the router's EWS page. However, you do not have this option on the printer's EWS page. In this case, where you are using a public network, you will not be able to use the MAC filtering feature as you are not the admin/owner of the router.
The only method is to use Wifi-Direct and change the default password to secure it.
For more info on connecting the printer via Wifi-Direct, refer to this document.
Hope this helps! Keep me posted.
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!
Have a great day!