$\dfrac{\cos(1/x)}{\cos(1/x)}$ is just a convoluted way of writing the constant function $1$ defined on the domain
$$\mathbb R \setminus\{0\} \setminus \Bigl\{\frac1{\pi/2+k\pi} \Bigm| k\in\mathbb Z \Bigr\} $$
Whether this function has a limit for $x\to 0$ depends more on which precise conventions you use for limits, than on the function itself.
In most of higher mathematics we'd have no problem speaking of a limit towards any limit point of the function's domain, and in that case the limit is easily $1$.
On the other hand, many introductory texts try to avoid confusion by insisting that $\lim\limits_{x\to a} f(x)$ is only defined when the domain of $f$ contains an entire punctured neighborhood of $a$ (as a subset of $\mathbb R$). If that convention is used, your limit doesn't exist, and it seems your teacher is assuming that way of thinking.
(Whether this convention actually avoids any confusion is debatable).