My instructor has said that, if $K$ is a number field, and $O_K$ is its ring of integers, any ideal of $O_K$ is a fractional ideal.
This is what allows us to say that, if the class group $\mathrm{Cl}(O_K)$ = (fractional ideals of $O_K$)/(principal fractional ideals of $O_K$) is trivial, then every fractional ideal of $O_K$ is a principal fractional ideal of $O_K$ $\Rightarrow$ every ideal of $O_K$ is a principal ideal of $O_K$ $\Rightarrow$ $O_K$ is a PID.
What about $O_K$ allows us to say this ? Is it the fact that it's an integral domain ? That it's a Dedekind domain (and, in particular, every nonzero prime ideal of $O_K$ is maximal) ?
In what rings $R$ can we conclude that every ideal of $R$ is actually a fractional ideal of $R$ ?
Thanks!