Let $b$ be some natural number such that for some $n\in \mathbb N$, $\sqrt{6n+1}$ is an integer.
That $b$ is odd is easier to show. Assume not; then $b=2k$ for some $k\in \mathbb N$, which means that
$$6n + 1 = 4k^2 \Rightarrow (3n-2k^2) = \dfrac{1}{2},$$ which cannot be true for natural numbers $n$ and $k$ because the .
Similarly, assume that $3|b$. Then be is similarly of the form $3k$ for some $k\in\mathbb N$. Which, again, gives us that
$$6n+1 = 9k^2 \Rightarrow (2n-3k^2) = \dfrac{1}{3},$$ a similar contradiction. This proves that every natural number of the form $\sqrt{6n+1}$ cannot have $2$ or $3$ as factors.
This does not, however, prove that every prime is there. We have showed that no number that is divisible by $2$ or $3$ can have this form; which was your original question. It is a necessary condition, not a sufficient one. A number may be indivisible by $2$ and $3$ while being divisible by other primes (say $5$), we have said nothing about numbers of that form. Your initial claim, and my proof, says nothing about say $b = 35$. To prove the much stronger second claim, we must show the following:
Every integer not divisible by $2$ or $3$ can be expressed as $\sqrt{6n+1}$.
Why is this true? Any integer can be written as one of the following:
$$6k - 3, 6k -2, 6k -1, 6k, 6k +1, 6k -2.$$
Of these, $3$ divides $6k-3$ and $6k$. $2$ divides $6k -2, 6k, 6k+2$. Which leaves us with only $6k\pm1$ being the only forms that are divisible by neither $2$ or $3$.
If you take the squares, you'll get $36k^2\pm 12k+1= 6(6k^2\pm2k)+1$, implying that they take the form $6n+1$. This proves that every integer not divisible by $2$ or $3$, and thus all primes, can be expressed in that form.
Note: Typically, questions asking for solutions to such expressions look for solutions in $n$, not $b$.