Can I use my tank to act like a retaining wall?

No. Due to uneven pressure on the tank this has the potential to deform and damage the tank.

However you can recess the tank into a bank as long as there is a clear space between the two.