The following example shows that, in its strongest form, the answer to Professor Emerton's question is no. This answer is essentially an elaboration on what is already in the comments.
Let $p \equiv q \equiv 5 \pmod 8$. Let $K/\mathbb{Q}$ be a cyclic
extension of degree four totally ramified at $p$ and $q$ and unramified
everywhere else (it exists). To make life easier, suppose that the $2$-part of the class
group of $K$ is cyclic.
The Galois group of $K$ is
$G = \mathbb{Z}/4 \mathbb{Z}$.
Let $C$ denote the class group of $K$. I claim that $C^G$ is cyclic
of order two. Since the $2$-part of $C$ is cyclic,
this is equivalent to showing that $C_G$ is cyclic of order two.
By class field theory, $C_G$ corresponds to a Galois extension
$L/\mathbb{Q}$ unramified everywhere over $K$ such that there is an exact sequence
$$1 \rightarrow C_G \rightarrow \mathrm{Gal}(L/\mathbb{Q})
\rightarrow \mathbb{Z}/4 \mathbb{Z} \rightarrow 1.$$
If $\Gamma$ is any finite group with center $Z(\Gamma)$, then an easy
exercise shows that $\Gamma/Z(\Gamma)$ is cyclic only if it is trivial.
We deduce that $L$ is the genus field of $K$.
There is a degree four extension $M/L$ contained inside the cyclotomic field
$\mathbb{Q}(\zeta_p,\zeta_q)$ that is unramified over $K$ at all finite
primes. However, the congruence conditions on $p$ and $q$ force $K$ to be
(totally) real and $M$ (totally) complex. Thus $M/K$ is ramified at
the infinite primes, and $C_G = \mathbb{Z}/2\mathbb{Z}$, and the claim is established.
We note, in passing, that $L = K(\sqrt{p}) = K(\sqrt{q})$.
Suppose there
exists a canonical element $\theta \in C$ such that $\theta^2 = \delta_K$,
where $\delta_K$ is the different of $K$.
The different $\delta_K$ is invariant under $G$. If $\theta$ is
canonical in the strongest sense then it must also be invariant under $G$. In particular,
the element $\theta \in C^G$ must have order dividing two, and hence $\theta^2 = \delta_K$
must be trivial in $C$. We conclude that if $\delta_K$ is not principal,
no such $\theta$ exists.
It remains to show that there exists primes $p$ and $q$ such that
$\delta_K$ is not principal and the $2$-part of $C$ is cyclic. A computation shows this is so for
$p = 13$ and $q = 53$. For those playing at home, $K$ can be taken to be
the splitting field
of
$$x^4 + 66 x^3 + 600 x^2 + 1088 x - 1024,$$
where $C = \mathbb{Z}/8 \mathbb{Z}$ and $\delta_K = [4]$. $C$ is generated by (any) prime
$\mathfrak{p}$ dividing $2$, and $G$ acts on $C$ via the quotient $\mathbb{Z}/2\mathbb{Z}$, sending $\mathfrak{p}$ to $\mathfrak{p}^3$.
I know nothing about work of ``idelic nature'' by Von Neumann or Pruefer. Already in the 1930's
Weil understood that Chevalley was wrong to ignore the connected component, because Weil understood already then that Hecke's characters were the characters of the idele class group for the right topology on that. I don't know of any place before his paper dedicated to Takagi where he defined the ideles explicitly as a topological group, but he must have understood the situation way before that
When I wrote my thesis I used what seemed to me to be the obvious topology without going into the history of the matter.
Best Answer
In principle, this follows from Borel and Serre's compactification of arithmetic orbifolds. Let $K$ be a field with $r$ real places and $s$ complex places, and $H_{r,s}=(\mathbb{H}^2)^r\times(\mathbb{H}^3)^s$. Then $SL_2(K)\leq PSL_2(\mathbb{R})^r\times PSL_2(\mathbb{C})^s$ by taking the product of the various Galois embeddings, and acts on $H_{r,s}$. Then via this embedding, $SL_2(\mathcal{O}K)$ acts discretely on $H_{r,s}$, with finite covolume. There are finitely many cusps of this orbifold $H_{r,s}/SL_2(\mathcal{O}_K)$, corresponding to the orbits of $PSL_2(\mathcal{O}_K)$ acting on $\mathbb{P}^1(K)$, which Borel and Serre provide a compactification for. When $K=\mathbb{Q}$, this compactifies $\mathbb{H}^2/PSL_2(\mathbb{Z})$ by a circle, and for $K=\mathbb{Q}(\sqrt{-D}), D\in \mathbb{N}$, $\mathbb{H}^3/PSL_2(\mathcal{O}_K)$ is compactified by Euclidean 2-orbifolds. In the real quadratic case, the compactification is by solv 3-orbifolds.
One may also deduce this from the fact that $H_{r,s}/SL_2(\mathcal{O}_K)$ is finite volume and from the Margulis lemma, which describes the structure of the cusps. I'm not sure who originally proved this, but Borel gave explicit formulae for the volume (although these formulae involve the class number).
This answer is not meant to indicate that this is how one should prove that the class group is finite, but to show how it fits into a certain mathematical context.