With $f^{-1}(Y)$ we denote a subset of $M$, namely
$$
f^{-1}(Y)=\{x\in M:f(x)\in Y\}
$$
When $X$ is a subset of $M$, we set
$$
f(X)=\{y\in N:\text{there exists $x\in X$ such that $f(x)=y$}\}
$$
It is not required that $f$ has an inverse for the notation $f^{-1}$ to be used in this context. So, no, your argument is invalid.
In order to prove the first statement, suppose $y\in f(f^{-1}(Y))$. This means there exists $x\in f^{-1}(Y)$ such that $y=f(x)$. By definition, $x\in f^{-1}(Y)$ implies $f(x)\in Y$. Therefore $y=f(x)\in Y$.
Hence we have proved that $f(f^{-1}(Y))\subseteq Y$.
For second statement, you only need to prove the converse inclusion under the assumption that $f$ is surjective.
Suppose $y\in Y$. By surjectivity, $y=f(x)$, for some $x\in M$. But, by definition, $x\in f^{-1}(Y)$, so, again by definition, $y\in f(f^{-1}(Y))$.