Expanding on Arturo Magidin's comment, there is an algorithm that finds the inverse of an element $\overline{a} \in \mathbb{Z}_n$ (which doesn't involve checking all elements), assuming such inverse exists. Indeed, the inverse of $\overline{a}$ exists if and only if $a$ and $n$ are coprime, and therefore, since $\gcd(a, n) = 1$, Bézout's Identity implies that $\exists \ \alpha, \ \beta \in \mathbb{Z}$ such that $\alpha a + \beta n = 1$. $\alpha$ and $\beta$ can be determined with the Extended Euclidean Algorithm. Now, you have: $\alpha a = 1- \beta n \equiv 1 \ \left(\text{mod} \ n \right) \Rightarrow \overline{\alpha} = \overline{a}^{-1} \ \text{in} \ \mathbb{Z}_n $ so the inverse of $\overline{a}$ has been determined. If you want to calculate $\frac{\overline{b}}{\overline{a}}$, simply multiply $\overline{b}$ by $\overline{\alpha}$.
As pointed out in the comments, if you are dealing with small $n$'s, such as $7$, checking all other elements of $\mathbb{Z}_n$ is probably faster then determining the coefficients of the Bézout Identity; however for large $n$'s the Extended Euclidean Algorithm is more efficient then an exhaustive check: the first has time complexity $O(\log^2(n))$ while the latter $O(n)$ (see Buchmann - an Introduction to Cryptography).