Quoting Introduction to Analytic Number Theory by Tom M. Apostol:
Theorem 6.1 Cancellationi laws. If elements $a$, $b$, $c$ in $G$ satisfy $$ ac = bc $$ or $$ ca = cb $$, then $ a = b $.
Theorem 6.2 (d) For all $a$ and $b$ in $G$ thee equation $ax = b$ has the unique solution $ x = a^{-1}b$; the equation $ya = b$ has the unique solution $y = ba^{-1}$.
Quoting the proof of Theorem 6.2 (d) now:
Again by associativity we have
$$ a(a^{-1}b) = (aa^{-1})b = b\hspace{1.5em} \text{and}\hspace{1.5em} (ba^{-1})a = b(a^{-1}a) = b. $$ The solultions are unique because of the cancellation laws.
Why do we have to invoke the cancellation laws the prove that the solutions are unique?
In other words, which step of the proof will not work if we do not invoke the cancellation laws?