\(f\) must be injective.
If it is not injective, there exist \(x,x'\in A: f(x)=f(x')\). Then \(f^{-1}(f(\{x\}))\subseteq \{x,x'\} \ne \{x\}\).
In general we have \(\forall M\subseteq A: f^{-1}(f(M))\supseteq M\). If for some \(M\) there exists \(x'\in f^{-1}(f(M))\setminus M\), we can find \(x\in M\) such that \(x'\in f^{-1}(f(x))\) and then \(f(x')=f(x)\), so \(f\) is not injective.