As long as the ATM accepts deposits then you should be able to deposit money into your bank account through any ATM machine even if it isn't owned by your bank.
But if you use a different ATM machine that isn't owned by your bank the funds can take longer to post to your checking or savings account.