When considering the same setup as in <a href="https://physics.stackexchange.com/questions/14078/using-amperes-circuital-law-for-an-infinitely-long-wire-wire-of-given-length">this question</a>, i.e. a straight, infinitely long wire carrying the current $I$, <a href="https://en.wikipedia.org/wiki/Ampere%27s_Law">Ampère's circuital law</a>

$$\oint_C \vec{B} \cdot \mathrm{d}\vec{r} = \mu_0 I_\text{enc}$$

is often used to calculate $\vec{B}$, as this is a cylindrically symmetric problem. Due to the symmetry, $\vec{B} = B(\rho) \vec{e}_\varphi$ (cylinder coordinates $\rho, \varphi, z$) is assumed and, by integrating over a circle with radius $\rho$, one finds

$$B(\rho) \cdot 2 \pi \rho = \mu_0 I \Leftrightarrow B(\rho) = \frac{\mu_0 I}{2 \pi \rho}$$

My question is whether the assumption $\vec{B} = B(\rho) \vec{e}_\varphi$ is actually valid. I can accept that $B$ has to be independent of $\varphi$ and $z$ due to the symmetry, but I'm not so sure about the direction of $\vec{B}$. In particular, $\vec{B}$ does depend upon $\varphi$, as $\vec{e}_\varphi = \begin{pmatrix} -\sin(\varphi)\\ \cos(\varphi) \\ 0\end{pmatrix}$, so the assumption that $\vec{B}$ is independent of $\varphi$ (as I've heard or seen in books) really only applies to the absolute $|\vec{B}|$, doesn't it? In fact, with this rationale, could $\vec{B}$ not also have components in other directions which are not "seen" by the line integral? Assuming

$$\vec{B} = B_\rho(\rho) \vec{e}_\rho + B_\varphi(\rho) \vec{e}_\varphi + B_z(\rho) \vec{e}_z,$$

the above would only calculate $B_\varphi(\rho)$. Does one have to use additional reasoning to be able to assume $\vec{B} = B(\rho) \vec{e}_\varphi$?