There may be an agreement with Mastercard and Visa not to charge the additional fees on ATMs operated by member financial institutions, but it is unlikely these exemptions would apply to the privately-operated "Vanilla" ATMs. The real problem has resulted because "landlords" are raising the rents on the space used by ATMs and getting a percentage of the "take". More bank ATMs are being displaced from locations -- airports, convenience stores -- for these privately-owned ones. They rely on fees to pay their bills and generate a profit.
Had the banks kept their monopoly on ATMs, these fees would have been controllable through regulated rates, or collusion not to compete for spaces and thus drive rental rates up.
Now, the consumer loses both ways.