NB: R is commutative
Let M be a free module over a (non-trivial)commutative ring R that is generated (not necessarily freely) by a subset T ⊂ M of size m. Show that if S is a basis of M, then S is finite with |S|$\leq$ m.
I have tried proving this directly using the definition of free basis functions can be uniquely extended to homomorphisms. But that has been fruitless.
So a new idea is to reduce to case of vector spaces by using the trick to Quotient by IM where I is a maximal ideal of R and consider this as an R/I module to get a vector space.
So we want to show if $R^m$ surjects (via f a R module hom) onto $R^n$ then $n\leq m$. I think that if we can construct from this a surjection from $(R/I)^m$ to $(R/I)^n$ as a R/I homomorphism then we are done.
so $q_n o f$ where where $q_n$ is the quotient map from $R^n to (R/I)^n$ gives us a surjection from $R^m to (R/I)^n$ but I'm not sure how to finish this argument
Here is another answer, this time assuming that $R$ is commutative.
Theorem. Let $R$ be a unital commutative ring and let $ T:R^m\to R^n $ be a surjection. Then $n\leq m$.
Proof. Leting $\{e_1, \ldots , e_n\}$ be the canonical basis of $R^n$, choose for each $i$, a vector $u_i$ in $R^m$ such that $T(u_i)=e_i$, and consider the linear transformation $S:R^n\to R^m$ defined on the canonical basis by $$ S(e_i)=u_i,\quad \forall i=1,\ldots ,n. $$ It is then evident that $T\circ S$ is the identity map on $R^m$.
Let $A$ be the matrix of $T$. That is, $A$ is an $n\times m$ matrix with entries $a_{i, j}$ such that, for every $(x_1,\ldots ,x_m)\in R^m$, one has that $$ T(x_1,\ldots ,x_m)=(y_1,\ldots ,y_n), $$ where $$ y_i=\sum_{j=1}^ma_{i,j}x_j, \quad \forall i=1,\ldots ,n. $$ Similarly let $B$ be the matrix for $S$.
From the fact that $T\circ S$ is the identity map on $R^m$ we deduce that $AB$ coincides with $I_n$, the identity $n\times n$ matrix.
Choose any field $K$ and a unit preserving ring homomorphism $\varphi :R\to K$. E.g., let $K$ be the quotient of $R$ by a maximal ideal and let $\varphi $ the quotient map.
Denoting by $\varphi (A)$ the $n\times m$ matrix over $K$ obtained by applying $\varphi $ to each entry of $A$, and similarly for $\varphi (B)$, we then have that $$ \varphi (A)\varphi (B) = \varphi (AB) = \varphi (I_n)=I_n, $$ from where we deduce that the rank of $\varphi (A)$ is $n$.
It is well known that the rank of an $n\times m$ matrix over a field is at most $\min\{n, m\}$, so $$ n = \text{rank}(A) \leq \min\{n, m\} \leq m. $$ QED