Please note that I am requesting a formal proof, using any technique.
There are two parts in the implication:
(i) if $p$ is a prime, then $p^3\mid y^2\implies p\mid y^2$,
(ii) if $p$ is a prime, then $p\mid y^2 \implies p\mid y$.
I know that, as by the post asked by me : if $p$ is a prime, and $p\mid a^k$ for any natural number $a,k$, then $p\mid a$, but the first part is not obvious from this.