You must accept if this ATM does not belong to your bank.
The fees charged in ATM are intended to limit you from successively withdrawing money and using ATMs outside the "network" that your bank has.
In this case, if you withdraw money from ATMs of other banks, you must accept the fee charged or you will not be able to withdraw that money.
To avoid this fee, you can:
Do not use ATMs from other banks. Using a credit card to complete purchases.
Looking for your bank's ATMs.
It is important to note that ATM is an acronym that stands for Automated Teller Machine. This is the machine that represents your bank and allows you to carry out economic transactions, such as withdrawing or transferring money.