Assume for simplicity that $n$ is squarefree. Let $p$ be an odd prime divisor of $n$, then $p$ ramifies in $\Bbb Q(\sqrt{n})$, but is unramified in $\Bbb Q(\zeta_{2^k})
$.
In general, the ramifications of prime numbers in quadratic and cyclotomic fields are completely known and the ramification puts heavy constraints on which subfields a cyclotomic field can contain. The prime $p=2$ is a bit special for quadratic extensions, but here's the general theory:
Let $d \in \Bbb Z$ be any squarefree integer, then a prime $p$ ramifies in $\Bbb Q(\sqrt{d})$ if and only if $p \mid d$ or $p=2$ and $d \not \equiv 1 \pmod{4}$.
Let $n \in \Bbb N$, assume that $n$ is either odd or divisible by $4$, then a prime $p$ ramifies in $\Bbb Q(\zeta_n)$ if and only if $p \mid n$.
Putting these together, you can for example figure out the unique quadratic subfield of $\Bbb Q(\zeta_{p^n})$ for $p$ odd. (Note that quadratic number fields specials are special in that they are uniquely determined by which prime numbers ramify.)
In particular, you get that if $\sqrt{d} \in \Bbb Q(\zeta_n)$ with $d$ square-free, then $d$ divides $n$ (but the converse need not hold in general).
Here's a (less elegant) alternative solution to the concrete question with just Galois theory and a little elementary number theory. Throughout, let's assume that $n$ is squarefree. Note that $G=\operatorname{Gal}(\Bbb Q(\zeta_{p^k})/\Bbb Q)\cong (\Bbb Z/p^k\Bbb Z)^\times$.
Assume first that $p$ is odd and $k \geq 1$, then $(\Bbb Z/p^k\Bbb Z)^\times$ is actually cyclic and hence has a unique subgroup of index two. By Galois theory, there's a unique unique quadratic subextension. You can figure out what it is using Quadratic Gauss Sums (or algebraic number theory, as above). It's always either $\Bbb Q(\sqrt{p})$ or $\Bbb Q(\sqrt{-p})$.
Now if $p=2$ and say $k\geq 3$, then $(\Bbb Z/2^k\Bbb Z)^\times \cong \Bbb Z/2\Bbb Z \times \Bbb Z/2^{k-2}\Bbb Z$. It follows that the Galois group has three index two subgroups and hence has three quadratic subextensions. Reducing to the case $k=3$, these three subextensions are easily found to be $\Bbb Q(i), \Bbb Q(\sqrt{2}), \Bbb Q(\sqrt{-2})$.
Returning to algebraic number theory, here's a related deep theorem. If $K/\Bbb Q$ is an abelian extension, then the Kronecker-Weber theorem tells us that $K\subset \Bbb Q(\zeta_n)$ for some $n$. If we choose $n$ to be minimal, then we can actually get some control over $n$: in this case, the prime factors of $n$ are exactly the primes that ramify (though they can appear to varying powers, depending on local conductors). Conversely, if $K \subset \Bbb Q(\zeta_n)$, then all the prime numbers that ramify in $K$ ramify in $\Bbb Q(\zeta_n)$, so we get that all ramified prime numbers (and hence their product divides $n$)
Consdiering that the ramified primes of $\Bbb Q(\sqrt{d})$ ($d$ squarefree) are essentially the prime divisors of $d$ (plus potentially $d$), the above the result can be seen as a generalised answer to the question.
If one uses the theory of conductors and ray class fields, one can get a more precise control on the minimal $n$ such that $K \subset \Bbb Q(\zeta_n)$.