By Ycor's arguments, it seems we can reduce to $p$-groups.
Assume $A$ and $B$ are finite $p$-groups. The $p$-rank of $A$ must equal the $p$-rank of $B$ or else the right exact sequence $(C/pC) \to (A/pA)^n\to (B/pB)^n \to 0$ would imply that the $p$-rank of $C$ is at least $n$ and hence that $C$ has at least $n$ generators.
But given that the $p$-rank of $A$ equals the $p$-rank of $B$, the same right exact sequence implies that $(A/pA)^n\to (B/pB)^n$ is an isomorphism, and so the sequence $0 \to C \to (pA)^n \to (pB)^n \to 0$ exists and is exact. So we might as well work with $pA$ and $pB$.
We can now apply induction on the cardinality of $A$ and $B$ to reduce to the base case when $A=B=0$, which implies $C=0$.
Rather than using Ycor's reduction, one can instead rephrase the inductive argument as a proof that $(A / mA)^n \to (B / m B)^n$ is an isomorphism for all natural numbers $m$, which implies that $A^n \to B^n$ is an isomorphism by a standard lemma.
Let me try to write carefully the argument for Noetherian rings. Let $C \to A^n \to B^n$ be an exact sequence of $R$-modules for a Noetherian ring $R$ where $C$ has fewer than $n$ generators. Our goal will be to show that $C$ vanishes. Let $\mathfrak m$ be a maximal ideal of $R$.
Consider the right exact sequence $(C/\mathfrak m C) \to (A/\mathfrak m A)^n\to (B/\mathfrak m B)^n \to 0$. We have $n \dim (A/\mathfrak m A) \leq \dim (C/\mathfrak m C) + n \dim(B/\mathfrak m B)$ and because every dimension is an integer and $\dim (C/\mathfrak m C) $, this implies that $\dim (A/\mathfrak m A) = \dim (B/\mathfrak m B)$ and hence the right map is an isomorphism, so $0 \to C \to (\mathfrak m A)^n \to (\mathfrak mB)^n \to 0$ is an exact sequence.
Iterating this argument, we see that for all $k$, $(A/\mathfrak m^k A)^n \to (B/\mathfrak m^k B)^n$ is an isomorphism. Hence the induced map from the $\mathfrak m$-adic completion of $A$ to the $\mathfrak m$-adic completion of $B$ is an isomorphism. Because $\mathfrak m$-adic completion of a Noetherian local ring is an exact functor on finitely generated modules, this implies the $\mathfrak m$-adic completion of $C$ is zero. In particular, $C/\mathfrak m C$ is zero. Because this holds for all maximal ideals $\mathfrak m$, and $C$ is a finitely-generated module, $C$ vanishes.