Does $x\equiv ay \pmod{p^{2m}}$ always have non-trivial solutions $x,y$ with $\lvert x \rvert,\lvert y \rvert \leq p^m$? Given a positive integer $m$, a prime $p$ and an integer $a$, I would like to prove that
$$
x \equiv ay \pmod{p^{2m}} \qquad \lvert x \rvert,\lvert y \rvert \leq p^m
$$
always has at least one solution $(x,y)\in\mathbb{Z^2}$ with $x,y$ not both $0$.

I have no problem if $p\mid a$. Indeed: if $\lvert a \rvert \leq p^m$ then $(a,1)$ is a solution, otherwise $p^m\mid a$ and $(0,p^m)$ will do.
If $p\nmid a$ then $a$ is invertible modulo $p^{2m}$, hence $x \equiv ay \pmod{p^{2m}}$ has many non-trivial solution. However, I don't know how to find one with $\lvert x \rvert,\lvert y \rvert \leq p^m$.
 A: I think this follows from something resembling the pigeon hole principle as follows.
Fix $a$. We can assume that $p^m\nmid a$ as the case $p^m\mid a$ is easy. Consider the set of smallest non-negative remainders modulo $p^{2m}$
$$
S_a=\{ay\bmod p^{2m}\mid 1\le y\le p^m\}.
$$
Observe that there are no repetitions, so $|S_a|=p^m$.
Let us place these $p^m$ pigeons into $p^m$ holes with hole #$j$ consisting of the interval
$I_j:=[jp^m, (j+1)p^m-1]$, $0\le j<p^m$. There are two possibilities. Either two or more pigeons try to enter the same hole, or all the holes are occupied by a single pigeon.
If there is no double occupancy, then one of the pigeons flew into the interval $I_0$. If this pigeon carried the coordinate tag $y_0$, this means that the remainder of $ay_0$ is in the range $I_0$, and we have found our solution: the matching $x_0$ is the remainder of $ay_0$ modulo $p^{2m}$.
The other case is that two pigeons, $ay_1$ and $ay_2$, are in the same hole. 
Without loss of generality we can assume that the remainder of $ay_1$ is smaller than that of $ay_2$. Thus the remainder $r$ of
$a(y_2-y_1)$ mod $p^{2m}$ is in the range $0<r<p^m$, and as $0<|y_2-y_1|<p^m$ we have, again, found a solution.
A: Put $R=\Bbb Z_{p^m}$ then in $R[x,y]$ the polynomial $x-ay$ has non trivial solutions iff $a \not \equiv 0 \pmod {p^m}$. Suppose $a \equiv 0 \pmod {p^n}$ with $n<m$ then take for $y$ a unit in $R$. It is impossible that $ay=0$ because that would imply that $y \equiv 0 \pmod {p^{m-n}}$ and so $y \equiv 0 \pmod {p}$, and this is a property that units just don't have. If $a \equiv 0 \pmod {p^m}$ then clearly $a=ay=0$.
