Are Euclidean domains exactly the ones which we can define "mod" on? A Euclidean domain $E$ is an integral domain where, for any $a, b \in E$, we can write:
$$a = bq + r$$
with either $r = 0$ or $f(r) < f(b)$, where $f$ is the valuation function attached to $E$.
Can I define the binary operation $\bmod$ such that $a \bmod b = r$ for all Euclidean domains? Will it always behave the same way as the mod function on $\mathbb{Z}$ that I'm used to?
What got me wondering was the observation that I can do this on the Euclidean domain $\mathbb{Q}[x]$ by using quotient rings:
$$
\begin{aligned}
\psi_{x^2 + x} &:: \mathbb{Q}[x] \rightarrow \mathbb{Q}[x]/\langle x^2 + x \rangle\\
\psi_{x^2 + x}(x^2 + x + 5) &= x^2 + x + 5 + \langle x^2 + x \rangle = 5 + \langle x^2 + x \rangle\\
\end{aligned}
$$
So $r = 5$ and $x^2 + x + 5 \bmod (x^2 + 5) = 5$, as you would expect. It also works for multiplication.
 A: To your title:  No. Any ring works for a mod operation, you just make things the standard coset way. Let $I\subseteq R$ be an ideal. Then we define

$$a\equiv b\mod I\iff a-b\in I.$$

And this is a well-defined equivalence relation.
For the integers this reduces to 
$$a\equiv b\mod n\iff a-b\in (n)\iff a-b=nk$$
for some $k\in\Bbb Z$.
So to the question in the body (which is not the same thing) as to if we can define mod for EDs:  yes you can, but they're not the most general setting.
A: In a Euclidean domain, there is no requirement that $r$ be uniquely determined by $a$ and $b$, so you cannot define mod in the way you proposed.
A: As you say, you’re using the binary function “mod” of the computer scientists. But in mathematics, one finds that this function is of very limited utility, and we use the equivalence relation $a\equiv b\pmod I$ instead. It’s read, “$a$ is congruent to $b$ modulo $I$”, and it’s a sentence that will be either true or false.
To your specific question, consider the Euclidean domain $\Bbb Z[i]$, the Gaussian integers. If you take a complex modulus like $\zeta=6+3i$, it makes perfect sense to say whether two Gaussian numbers $\alpha$ and $\beta$ are congruent modulo $\zeta$, namely you check to see whether $\beta-\alpha$ is a multiplie of $\zeta$ by another Gaussian number. But there is no good and consistent way of defining a “mod” function here. You can make up an artificial “mod” function in this situation, but it will be neither good nor consistent.
