There's no way to restrict a macro to a page within the macro itself, but depending on how the macro is set up it is possible to to what you want. Where is the macro button located? In the Collections tab? Or on their character sheet? In those cases, the macro will always be available. However, if you create a token for each town on the map page, and then link those town tokens to a 'Town' character, and create an Ability macro button on the 'Town' character sheet for the macro, then it will only be available when they click on the town token. Then if the town token is only on the map page, it'll only be available when they're on that page. You want to make sure that the macro is set up with the "Show as Token Action" checked, not the "Show in Macro Bar".