The modulus can be any integer - no restrictions are needed. The definition of congruence is
$\quad{\rm for}\,\ a,b,n\in\Bbb Z\!: \ a\equiv b\pmod{\!n}\!$ $\overset{\rm def\!}\iff n\mid a-b\!\!\overset{\rm def\!\!}\iff a- b = kn,\ \text{for some } k\in\Bbb Z$
So both congruence and divisibility are defined for all $\:\!n\,$ (note $\:\!0\mid c\!\iff\! c\! =\! 0,\,$ cf. Note below).
Such generality can prove useful, e.g. a fundamental number theory reduction technique relies on the property that congruences persist mod divisors of the modulus, so we can attempt to deduce solutions of congruences $\!\bmod n\,$ by combining solutions mod smaller (so simpler) divisors of $\,n\,$ (e.g. by CRT). With the general definition this reduction method also applies the same way to the modulus $\,n = 0,\,$ where $\,a\equiv b\pmod{\!0}\iff 0\mid a-b\iff a = b,\,$ so congruence $\!\bmod 0\,$ is just integer equality, i.e. $\,\Bbb Z_0 \cong \Bbb Z.\,$ So for modulus $\,n=0\,$ the above reduction method says that integer equalities persist as congruences $\!\bmod m\,$ for every integer $\,m\,$ (by $m$ divides $0),\,$ so we can study integer equations by studying their simpler solutions $\!\bmod m$.
We can use such reductions to help study solutions of integer (Diophantine) equations, one of the most fundamental problem solving methods in number theory (and algebra). For example for any even modulus $\,n\,$ a congruence (or equation) $\!\bmod n\,$ persists as a congruence $\!\bmod 2,\,$ where simple parity arithmetic may prove there are no solutions, e.g. see the Parity Root Test. Such parity analysis works for any even modulus, including $\,n=0.\,$ It is unnatural to separate out the modulus $\,n = 0\,$ from other even moduli. The reduction applies uniformly to all even moduli.
Note $ $ There is no division in $\,0\mid x\!\iff\! c\!=\!0,\,$ so $\,0\mid 0.\,$ Here $\,k\mid n\!\!\!\overset{\rm def\!\!\!}\iff\! n = jk,\,$ some $\,j\in\Bbb Z.\,$ In particular $\,0\mid n\!\!\!\overset{\rm def\!\!\!}\iff\! n = j\cdot 0 = 0\,$ for some $\,j\in\Bbb Z\!\iff\! n = 0.\,$ Confusing divisibility with division is very common. Thwarting such confusion is one of the reasons some authors exclude divisibility by $\:\!0\:\!$ in their definition of divisibility (so also in moduli). Such confusion spreads further to congruences if we define $\,a\equiv b\pmod{\!n}\,$ as $\,a\bmod n = b\bmod n,\,$ i.e. $\,a\,$ and $\,b\,$ leave the same remainder when divided by $\,n.$ While this is equivalent to the above definition for $\,n\!\neq\! 0,\,$ it does not generalize to other rings (as the above definition does). See here for much more discussion on $\!\bmod\!$ the congruence relation vs. the (normal-form) remainder operation.