Let $K$ be a global field (number field or algebraic function field over a finite field), $\mathcal{V}$ the set of $\mathbb{Z}$-valuations on $K$, $S \subseteq \mathcal{V}$ a finite set. The ring of $S$-integers is the subring of $K$ defined as $$ \mathcal{O}_S = \lbrace x \in K \mid \forall v \in \mathcal{V} \setminus S : v(x) \geq 0 \rbrace. $$ I am looking to puzzle together references for the following statement:
Let $R$ be a subring of $K$ such that $K$ is the fraction field or $R$. Then $R$ is finitely generated as a ring if and only if it is contained in some ring of $S$-integers.
A reference for the full statement would be amazing. I have been able to piece together pieces from different references, but the part which is generally missing is that $\mathcal{O}_S$ is actually finitely generated as a ring (equivalently, a $\mathbb{Z}$-algebra) for any choice of $S$.
Where should I look to find a reference for this statement? It feels like a statement from commutative algebra, but a minimal amount of number theory (respectively algebraic geometry) is needed to prove it, at least in the proofs I know of. On the other hand, there is no mention of the statement in any algebraic number theory books I consulted.
Alternatively, if someone has a very short proof, that is also very welcome. I need the statement for an article, but writing out all the details of the number theoretic proof would fall outside of the scope of the article.