$
\newcommand{\O}{\mathcal O}
\newcommand{\Cl}{\mathrm{Cl}}
\newcommand{\p}{\mathfrak{p}}
$
Let $K$ be a number field, and $a_1, ..., a_h$ be ideals of $\O_K$ which are representatives of the ideal classes of $\Cl(\O_K)$ (in particular, $h$ is the class number of $K$).
Let $S$ be a finite set of places of $\O_K$, containing all the prime factors of all $a_i$, as well as all infinite places.
Claim : The ring $\O_{K, S}$ is a principal ideal domain.
Proof :
By proposition 23.2 b) and d), the ring $\O_{K, S}$ is a Dedekind domain, and every ideal of $\O_{K,S}$ is an extended ideal, i.e. of the form $J\O_{K,S}$ for some ideal $J \subset \O_K$.
By definition of the ideals $a_i$, there is an element $x \in K^{\times}$ and an index $i$ such that
$$J = x a_i.$$
The ideal $a_i^h = y \O_K$ is principal (where $y \in \O_K$), since the class group is annihilated by $h$. One sees that $y \in a_i \cap \O_{K,S}^{\times}$ (because $a_i^h \subset a_i$ and the only primes dividing $y$ are in $S$), which implies that
$a_i \O_{K,S} = (1)$
and finally
$$J \O_{K,S} = x \O_{K,S} \subset \O_{K,S}$$
is a principal ideal, as claimed.
Remarks:
1)
Instead of using proposition 23.2 above, one can first show that $\O_{K,S}$ is equal to a localization $\Sigma^{-1}\O_K$, namely for the multiplicative set $\Sigma$ of elements $a \in \O_K \setminus \{0\}$ such that the only prime factors of $a \O_K$ belong to $S$, that is
$$\Sigma = \bigcap_{\p \not \in S} (\O_K \setminus \p) = \O_K \setminus \bigcup_{\p \not\in S} \p.$$
(There seems to be a typo on page 41 of this book. The "multiplicative" set they are considering doesn't even contain $1$).
Notice that we want to show the equality
$$\left( \bigcap_{\p \not \in S} (\O_K \setminus \p) \right)^{-1} \O_K = \bigcap_{\p \not \in S} ((\O_K \setminus \p)^{-1} \O_K),$$
which is not obvious.
$$ $$
A) We clearly have $\Sigma^{-1} \O_K \subseteq \O_{K,S}$. The reverse inclusion is not obvious: it uses the fact that the class group of $\O_K$ is torsion (because finite) — see here. In fact the argument is similar as above: pick $x \in \O_{K,S}$. For every $\p \in S$ such that $v_{\p}(x) < 0$, write $\p^h = b_{\p} \O_K$ as an principal ideal. Then
$b := \prod\limits_{v_{\p}(x) < 0} b_{\p}^{-v_{\p}(x)}$ is an element of $\O_K$ only divisible by primes in $S$, so that $b \in \Sigma$.
Finally, $bx \in \O_K$, so we conclude that $x \in \Sigma^{-1} \O_K$ as desired.
[Here is a wrong proof that $\O_{K,S} \subset \Sigma^{-1} \O_K$ : if $x \in \O_{K,S}$ is non-zero, then fix $b_p \in p^{-v_p(x)}$ for every prime $p \in S$ such that $v_p(x)<0$. Then $b = \prod_p b_p \in \Sigma$ and $xb \in \O_K$, so that $x \in \Sigma^{-1} \O_K$. The problem is that $b$ may have prime factors outside $\{ \p \mid a_i \}$, so that $b \in \Sigma$ is not true].
See also here, or here about relation between overrings and localizations. Moreover, remark 2.1 here might be of interest (but there is no proof there).
Finally, more general statements are given in theorem 2 here, mostly proven in Fossum, The Divisor Class Group of a Krull Domain.
$$ $$
B) Once you know that $\O_{K,S} \cong \Sigma^{-1}\O_K$, you can apply proposition 3.11.1) in Atiyah, MacDonald, Introduction to Commutative Algebra, to conclude that any ideal of $\O_{K,S}$ is indeed an extended ideal $J \O_{K,S}$, where $J$ is an ideal of $\O_K$. (Moreover, any localization of a Dedekind domain is still Dedekind, see here).
$$ $$
C) You can also look at prop. 4.19 here, but notice that they define $\O_{K,S}$ as a localization.
$$ $$
2) Here we are considering the multiplicative set
$\Sigma = \O_K \setminus \bigcup\limits_{\p \in \mathrm{Spec}(\O_K) \setminus S} \p.$
If instead you consider $\Sigma' = \O_K \setminus \p$ for a single fixed prime $\p$ of $\O_K$, you also get that $(\Sigma')^{-1}\O_K = (\O_K)_{\p}$ is a PID : it is even a DVR.
This is a result similar to the claim above, but which is in fact quite unrelated, since $\Sigma$ deals with the cofinite set $\mathrm{Spec}(\O_K) \setminus S$ of primes, while $\Sigma'$ deals with the finite set $\{\p\}$...
Best Answer
Possibly the idea of "fractional ideal" is not explicit enough in what you're reading. Namely, to make "ideals" (or ideal classes...) into a group, in the first place, and to have $k^\times$ map to it at all, we need multiplicative inverses to ideals, under ideal multiplication.
The thing about needing at most two generators is misleading. Rather, it turns out that a good characterization of "fractional ideal" is as a (ok, non-zero) finitely-generated $\mathfrak o$-submodule of the field, where $\mathfrak o$ is the ring of integers. Then, for Dedekind domains (maybe as a definition/characterization) we prove that the collection of (non-zero) fractional ideals really is a group.
Then it makes more sense to talk about a/the map from $k^\times$ to the group of fractional ideals. Yes, send $\alpha\not=0$ to the fractional ideal generated by it, namely, $\alpha\cdot \mathfrak o$.
No, this is NOT injective, as the questioner suspects, because two elements of $k^\times$ differing by a unit (in $\mathfrak o^\times$) hit the same fractional ideal.
But I'd wager that any accidental claim that it does inject is irrelevant to the rest of the development. :)
EDIT: if we allow ourselves to step away from a tooo-classical viewpoint: instead of "ideal classes" as the middle joint in a purported short exact sequence, we might/should have the ideles of the global field. And, perhaps, even the smaller group of ideles of idele-norm $1$, since $k^\times$ injects to that, by the product formula. :) And then the product is the (far more universal) "idele class group", ... maybe with some extra archimedean components, which we could manage to kill off if we really wanted.
Point is: the injectivity is (of course) correct with "idele class group"... and/but not for the (in-effect, level-one) specific class group.