Euler's totient theorem states that if $a$ and $n$ are coprime positive integers, then: $$a^{\varphi(n)} \equiv 1\;(\mathrm{mod}\;n)$$ So if $k$ is a given positive integer, which satisfies: $$\begin{cases} a^k \equiv 1\;(\mathrm{mod}\;n)\\ k\leqslant \varphi(n) \end{cases}$$
Does it necessarily hold that $k\,|\,\varphi(n)$?

No. For example $n=16$, $\phi(n)=8$, $a=9$, $k=6$. You can confirm that $$9^6\equiv1\pmod{16}\quad\hbox{but}\quad 6\not\mid8\ .$$
However if $a$ is given and $k$ is the smallest positive integer such that $a^k\equiv1\pmod n$, then it is true that $k\mid\phi(n)$. In the above example the smallest possible value of $k$ would have been $2$, not $6$.