$A^m\hookrightarrow A^n$ implies $m\leq n$ for a ring $A\neq 0$
I'll permit myself to paraphrase and somewhat expand Balazs Strenner's argument using the Cayley-Hamilton theorem in the MO thread mentioned in the comment by Dylan Moreland, as maybe the sheer conciseness of that answer makes it less transparent to some.
Supposing for a contradiction $m>n$, compose your injection with the natural injection $A^n\to A^m$ so as to obtain an injective $A$-module endomorphism $\phi:A^m\to A^m$, which moreover when (further) composed with the function $\gamma:A^m\to A$ taking the final coordinate gives the zero map $A^m\to A$.
Let $\chi\in A[X]$ be the characteristic polynomial of $\phi$ (which being monic is certainly non-zero), and let $k\in\mathbf N$ be maximal so that $X^k$ divides $\chi$, in other words $\chi=X^kP$ where $P$ has constant term $c\neq0$. (Since the matrix of $\phi$ has its last $m-n$ columns zero, one can see that $k$ is at least $m-n$, but this fact is not used in the argument.) Now by the Cayley-Hamilton theorem $\chi(\phi)=0\in\mathrm{End}(A^m)$, which we can write as $\phi^k\circ P(\phi)=0$. Since $\phi$ is injective one has $\ker(\phi^k)=\{0\}$, so it follows that $P(\phi)=0$. But then $\gamma\circ P(\phi)=0$, and since $\gamma\circ\phi=0$ what remains after dropping null terms is $\gamma\circ c\phi^0=\gamma\circ cI=c\gamma=0$, a contradiction since $c\gamma$ sends the final basis element of $A^m$ to $c\neq0$.
From Lam's Lectures on Modules and Rings...
This doesn't directly answer the original post asking for a proof that does not invoke Cramer's rule (which I interpret to mean a proof that doesn't use the fact that a system of homogeneous linear equations in more variables than equations has a nontrivial solution). But other questions have been closed with this question as the duplicate, I thought perhaps we might add some of the standard proofs.
To make up for it, let me discuss four related notions:
A ring $R$ is said to have (right) IBN ( Invariant basis number ) if, for any natural numbers $n$ and $m$, $R^n\cong R^m$ (as right modules) implies $n=m$.
A ring $R$ satisfies the rank condition if, for any $n\lt\infty$, any set of $R$-module generators for $R^n$ has cardinality at least $n$; equivalently, if $\alpha\colon R^k\to R^n$ is an epimorphism of (right) free modules, then $k\geq n$.
A ring $R$ satisfies the strong rank condition if, for any $n\lt\infty$, any set of linearly independent elements in $R^n$ has cardinality at most $n$. Equivalently, if $\beta\colon R^m\to R^n$ is a monomorphism of (right) free modules, then $m\leq n$.
A ring $R$ is stably finite if the matrix rings $\mathbb{M}_n(R)$ are Dedekind finite for all natural numbers $n$ (a ring $S$ is Dedekind finite if, for any $c,d\in S$, $cd=1$ implies $dc=1$).
(Commutative rings are, of course, Dedekind finite; they are also stably finite, as noted below.)
Proposition. If $R$ satisfies the strong rank condition, then it satisfies the rank condition.
Proof. Let $\alpha\colon R^k\to R^n$ be onto; by the universal property of free modules, $\alpha$ splits, so there is a one-to-one map $\beta\colon R^n\to R^k$ such that $\alpha\circ\beta=I_{R^n}$. By the strong rank condition, $n\leq k$, as required. $\Box$
Proposition. The following are equivalent:
- $R$ is stably finite.
- For any $n$, if $R^n\cong R^n\oplus N$ as $R$-modules, then $N=0$.
- For any $n$, any $R$-module epimorphism $R^n\to R^n$ is an isomorphism.
Proof. (1)$\Rightarrow$(3): Let $p\colon R^n\to R^n$ be an epimorphism. Since $R^n$ is free, we know that $p$ splits, so there exists $q\colon R^n\to R^n$ such that $p\circ q = I_{R^n}$. Viewing $p$ and $q$ as $n\times n$ matrices $c$ and $d$, we have that $cd=1$ in $\mathbb{M}_n(R)$, hence by stable finiteness $dc=1$. Therefore, $q\circ p = 1$, so $p$ is one-to-one; thus $p$ is an isomorphism.
(3)$\Rightarrow$(2). Compose the isomorphism $R^n\to R^n\oplus N$ with the projection onto the first coordinate; this is an epimorphism, hence by (3) an isomorphism, so $N=0$.
(2)$\Rightarrow$(1). Let $c,d\in\mathbb{M}_n$ be such that $cd=1$. We view $c$ and $d$ as maps $R^n\to R^n$. Then we can write $R^n = d(R^n)\oplus\mathrm{ker}(c)$, and since $cd=1$, $d(R^n)\cong R^n$. Hence $R^n\cong R^n\oplus\mathrm{ker}(c)$, so by (2) we have $\mathrm{ker}(c)=0$. Thus, $c$ is one-to-one and onto, hence invertible; since $d$ is a right inverse for $c$, we must have $d=c^{-1}$, so $dc=1$. Thus, $R$ is stably finite. $\Box$
Proposition. If $R$ is nonzero and is stably finite, then $R$ satisfies the rank condition.
Proof. If $R$ does not satisfy the rank condition, then we have an epimorphism $\alpha\colon R^k\to R^n$ with $k\lt n\lt\infty$. Then (by an argument similar to that for $R^n = d(R^n) \oplus \mathrm{ker}(c)$ in the proof of (2)$\Rightarrow$(1) above) we get $$R^k \cong R^n\oplus\mathrm{ker}(\alpha) \cong R^k\oplus (R^{n-k}\oplus \mathrm{ker}(\alpha)),$$ where $R^{n-k}\oplus \mathrm{ker}(\alpha)\neq 0$, which proves that $R$ is not stably finite. $\Box$
Proposition. If $R$ satisfies the rank condition, then $R$ has IBN.
Proof. If $R^n\cong R^m$, the rank condition gives $n\leq m$ and $m\leq n$, hence $n=m$. $\Box$
Proposition.
A ring $R$ fails to satisfy the rank condition if and only if for some $n\gt k\geq 1$ there exist an $n\times k$ matrix $A$ and a $k\times n$ matrix $B$ over $R$ such that $AB=I_n$.
A ring $R$ satisfies the strong rank condition if and only if any homogeneous system of $n$ linear equations over $R$ with $m\gt n$ unknowns has a nontrivial solution over $R$.
Proof.
If $A$ and $B$ are matrices as given, then multiplication by $A$ gives an epimorphism $R^k\to R^n$ with $n\gt k$, proving that $R$ does not have the rank condition. Conversely, if the rank condition fails, then an epimorphism $\alpha\colon R^k\to R^n$ with $n\gt k$ yields $A$, and a splitting map for $\alpha$ gives $B$.
Write $R^n = \bigoplus_{i=1}^n e_iR$; let $u_1,\ldots,u_m$ be vectors of $R^n$, and write $u_j = \sum_{i=1}^n a_{ij}e_i$ (writing as left modules). Then if $x_j\in R$, we have $$\sum_j x_ju_j = \sum_i e_i\left(\sum_j a_{ij}x_j\right);$$ this combination is zero if and only if $x_1,\ldots,x_m$ are a solution of the system $A\mathbf{x}=\mathbf{0}$, where $A=(a_{ij})$ and $\mathbf{x}=(x_1,\ldots,x_m)^t$. Thus, if every system with $m\gt n$ has a nonzero solution, then $u_1,\ldots,u_m$ linearly independent implies $m\leq n$, the rank condition; and conversely, a system with $m\gt n$ with no nontrivial solutions produces an $m\gt n$ with $m$ linearly independent vectors in $R^n$. $\Box$
Theorem. A non-zero (right) noetherian ring $R\neq 0$ satisfies the strong rank condition.
Proof. Let $R\neq 0$ be (right) noetherian. For any $n$, $A=R^n$ is a noetherian module (finitely generated over a noetherian ring). If $m\gt n$, then $R^m = R^n\oplus R^{m-n}$. If we could embed $R^m$ in $R^n$, then we would be able to create an infinite ascending chain of submodules, $R^{m-n}\subset R^{m-n}\oplus R^{m-n}\subset R^{m-n}\oplus R^{m-n}\oplus R^{m-n}\subset\cdots$ by iterating the embedding of $R^m$ into $R^n$. But this is impossible with $R^{m-n}\neq 0$ in a noetherian ring. $\Box$
Corollary. Every commutative unital ring $R\neq 0$ satisfies the strong rank condition.
Proof. Let $A\mathbf{x}=\mathbf{0}$ be a system of $n$ linear equations in $m$ unknowns, $m\gt n$, and let $a_{ij}$ be the entries of $A$. Let $R_0$ be the subring of $R$ generated by $1_R$ and the $a_{ij}$. By the Hilbert Basis Theorem, this is a nonzero noetherian ring (it is a quotient of a polynomial ring over $\mathbb Z$ in finitely many unknowns), hence the system has a nontrivial solution in $R_0$ (as $R_0$ satisfies the strong rank condition), hence the system has a nontrivial solution in $R$. Thus, $R$ has the strong rank condition. $\Box$
Corollary. Any unital commutative ring $R$ is stably finite.
Proof. Let $C,D\in\mathbb{M}_n(R)$ such that $CD=I_n$. Then $\det(C)\det(D)=1$, so $\det C$ is a unit in $R$; hence $C$ is invertible with inverse $(\det C)^{-1}\mathrm{adj}(C)$ (the classical adjoint of $C$); since $D$ is a right inverse of an invertible matrix, it is the inverse, so $DC=I_n$. Thus, $R$ is stably finite. $\Box$