You're right to have doubts on the definition.
In the following, $m$ is a fixed integer with $m>1$.
Let $a\in\mathbb{Z}$; we say that $\bar{a}\in\mathbb{Z}$ is an inverse of $a$ modulo $m$ if $a\bar{a}\equiv1\pmod{m}$
There's no point in excluding multiples of $m$ from the definition; on the other hand, they cannot have an inverse modulo $m$, but the same is true also for other integers, unless $m$ is prime. For instance $2$ has no inverse modulo $6$.
Why cannot multiples of $m$ have an inverse modulo $m$? If $a$ is a multiple of $m$, then $ab\equiv0\pmod{m}$ for every $b\in\mathbb{Z}$, and $0\not\equiv1\pmod{m}$ because $m>1$.
The condition that $\bar{a}$ (why changing notation?) belongs to $\{0,1,\dots,m-1\}$ in the theorem is stated in order to achieve uniqueness.
Indeed the inverse, if it exists, is only determined up to multiples of $m$: you can easily see that $4$ is an inverse of $2$ modulo $7$, but so are $11$, $-3$, $18$, $-10$ and so on.
More precisely, if $\bar{a}$ is an inverse of $a$ modulo $m$, then also $\bar{a}+km$ is, for every $k\in\mathbb{Z}$. Indeed
$$
a(\bar{a}+km)\equiv a\bar{a}+akm\equiv a\bar{a}\equiv1\pmod{m}
$$
Also the converse is true: if $b$ and $c$ are inverse of $a$ modulo $m$, then $b\equiv c\pmod{m}$. Here's the proof:
$$
c\equiv c1\equiv c(ab)\equiv (ca)b \equiv 1b\equiv b\pmod{m}
$$
Thus, if an inverse modulo $m$ exists, also its remainder modulo $m$ is an inverse. And there can be only one in the range $\{0,1,\dots,m-1\}$ because two inverses are congruent modulo $m$, but distinct numbers in that range aren't congruent modulo $m$.