Let $K = \mathbb{Q}[i]$ and $\mathcal{O}_K = \mathbb{Z}[i]$. Suppose $a = 1 + 2i$ and $q = 7$. Since $a$ and $q$ are coprime algebraic integer, then there must exists $b \in \mathcal{O}_K $ s.t. $a * b = 1 \pmod{q} $.
Is there an algorithm for finding that for a general number field $K$?