Answer to the title question: Yes, $(a) = (b)$ in $\mathbb{Z}/(n)$ iff $a, b$ are associates in $\mathbb{Z}/(n)$.
Hint: by Chinese Remainder it suffices to consider the case $n = p^k$ is a prime power. Then show that every ideal of $\mathbb{Z}/(p^k)$ is of the form $(p^n + (p^k))$ for some $n = 0, \ldots, k$. Then check directly that $p^n + (p^k)$, $p^m + (p^k)$ are associates iff $n = m$.
For a "universal" counterexample outside $\mathbb{Z}/(n)$, take $R = k[x,y]/(yx^2-y)$, where $k$ is any field: here $(y) = (xy)$, but $y$ and $xy$ are not associates.
Edit: The last point is subtle, and deserves clarification. If $\text{char}(k) \ne 2$, there is an injection
$$R \hookrightarrow k[x,y]/(y) \times k[x,y]/(x^2-1) \cong k[x] \times (k[x]/(x-1))[y] \times (k[x]/(x+1))[y]$$
(notice $(x-1), (x+1)$ are comaximal in $k[x]$ since $\text{char}(k) \ne 2$). This induces an injection
$$R^\times \hookrightarrow (k[x] \times (k[x]/(x-1))[y] \times (k[x]/(x+1))[y])^\times \cong k^\times \times k^\times \times k^\times$$
A unit in $R$ is thus (the image of) a polynomial $f \in k[x,y]$ that is simultaneously a nonzero constant modulo $y, x-1$, and $x+1$. Being a unit modulo $y$ means $f = u + yg$ for some $g \in k[x,y]$, $u \in k^\times$. Then $f \bmod (x-1)$ constant in $k[y] \implies g(1,y) = 0$ (otherwise $\deg_y f(1,y) > 0$), so $(x-1) \mid g$ (by expanding $g$ in terms of $x-1$). By the same reasoning $(x+1) \mid g$, so in fact $(x^2-1) \mid g$. Thus $f = u + y(x^2-1)h \implies f \equiv u$ in $R$ is constant.
If $\text{char}(k) = 2$, then $x^2-1 = (x+1)^2$. Setting $S := k[x,y]/(x+1)^2$, there is an injection
$$R^\times \hookrightarrow (k[x,y]/(y) \times S)^\times \cong k^\times \times S^\times$$
Under the projection $S \to k[y]$ (quotienting by $x+1$), every unit in $S^\times$ differs modulo $x+1$ from a unit in $k[y]^\times = k^\times$. Thus $S^\times = k^\times + (x+1)S$, so if $f \in k[x,y]$ reduces to a unit in $S$ and $k[x]$, $f = u + (x+1)g$ for some $u \in k^\times, g \in k[x,y]$. Moreover $y \mid g$ (otherwise $\deg_x f(x,0) > 0$), so in fact $f = u + y(x+1)h$, which are indeed all units in $R$ (since $(y(x+1))^2 = 0$ in $R$, so $f^2 = u^2$). Thus $R^\times = \{k^\times + y(x+1)h \mid h \in R\}$, so for any $v \in R^\times$, $xy \ne vy$ (indeed, either $vy \in k^\times y$ or $\deg_y(vy) \ge 2$).
If you are working with polynomials over a field, then any scalar is a unit.
If your polynomials are over a ring which is not a field, then there will be scalars which are not units (have no multiplicative inverse). In $\mathbb Z[x]$ it is clear that $2$ is not an associate of $1$ even though it is a scalar multiple of $1$.
I would check whether the definition in your book specifies that you are working with polynomials over a field.
Best Answer
See the following paper,
When are Associates Unit Multiples?
D.D. Anderson, M. Axtell, S.J. Forman, and Joe Stickles
Rocky Mountain J. Math. Volume 34, Number 3 (2004), 811-828.
It is mostly concerned with finding sufficient conditions on commutative rings that ensure that $Ra=Rb$ implies $a = bu$ for a unit $u$, but they do give some examples of $R$ where this fails. In particular this simple example of Kaplansky. Let $R=C[0,3]$, the set of continuous function from the interval $[0,3]$ to the reals. Let $f(t)$ and $g(t)$ equal $1-t$ on $[0,1]$, zero on $[1,2]$ but let $f(t)=t-2$ on $[2,3]$ and $g(t)=2-t$ on $[2,3]$. Then $f$ is not a unit multiple of $g$ in $R$ but each divides the other.