It seems to me that from $\mathbb{Z}^{n}\cong A\subseteq G \subseteq B\cong \mathbb{Z}^{n}$ it should directly follow that $G\cong \mathbb{Z}^{n}$ using the structure theorem for finitely generated abelian groups ($G$ must be finitely generated because it is a $\mathbb{Z}$-submodule of the finitely generated $\mathbb{Z}$-module $B$, and $\mathbb{Z}$ is a noetherian ring).
But my professor, in two different sources, says (after having those inclusions already) that $G$ is free of rank $n$ because the quotient group $B/A$ is finite. I assume he is arguing with additivity of the rank in short exact sequences ($G$ is free and $G/A\subseteq B/A$ is also finite, hence of rank $0$): $$ 0\to A \to G\to G/A \to 0$$
This seems to me like an unnecessary step, but since he does it in both sources I am worried that I may be missing something. Am I missing anything?
Remark 1: in case it matters, the $\mathbb{Z}$-module in question is $\mathcal{O}_{K}$, where $K$ is a number field of degree $n$ over $\mathbb{Q}$. I thought that maybe he just wants to compute the cardinality of $B/A$ because it is interesting information in itself. But why would he do it inside the proof then?
Remark 2: I also thought that he may be avoiding the structure theorem following the moto "don't use big theorems if you don't need them". So instead of using the structure theorem he would be using additivity of the rank. But again, I am afraid that this may not be the reason and that I am missing out on something.
Let me sum up the comment discussion.
What you know for sure is that $G\simeq\mathbb{Z}^m$ for some $m$. What you don't know is the following:
Proof. Can be found here: $A^m\hookrightarrow A^n$ implies $m\leq n$ for a ring $A\neq 0$ $\Box$
For the simple case of $R=\mathbb{Z}$ the lemma follows from the additivity of the rank, i.e. if we have a short exact sequence
$$0\to A\to B\to C\to 0$$
and we know that $rank(B)=rank(A)+rank(C)$ then the lemma follows by taking $C:=B/\text{im}(f)$ and realizing the trivial $rank(C)\geq 0$ inequality.
So with that lemma it is easy to complete the proof: $n=m$ because $n\leq m$ and $m\leq n$ (and those inequalities follow from the lemma).
All in all: your professor seems to know what he's doing. ;)
Side note: The lemma does not hold in general non-commutative case. Rings with the property
$$R^n\simeq R^m\text{ iff }n=m$$ are known as IBN rings. You can read more about them here: https://en.wikipedia.org/wiki/Invariant_basis_number