Edit 2: Sorry for being incomprehensible yesterday. I believe the result is true, at least if $R$ is noetherian. Let me assume that $R$ is noetherian, this makes me feel better.
Then $R$ injects into $\prod_p R_p$, where the product is taken over minimal primes of $R$. It is enough to show the statement for $R_p$. Now, $R_p$ is a local ring with a nilpotent maximal ideal.
So assume (as we may) $R$ is local with a nilpotent maximal idela $\mathfrak m$. Consider the exact sequence $0\rightarrow Ker A \rightarrow R^n\rightarrow Im A\rightarrow 0$. Since $Im A$ is free, it is projective, hence the sequence slits. Thus $Ker A$ is projective (since a direct summand of a free). Since $R$ is local, $Ker A$ is free.
Case 1. $\lambda\not\in \mathfrak m$. Then $\lambda$ is a unit in $R$. Thus the intersection of $Ker A$ and $Ker(A-\lambda)$ is zero. Now $A^2=\lambda A$ implies that $R^n= Ker A\oplus Ker(A-\lambda)$, and we are done.
Case 2. $\lambda\in \mathfrak m$. Choose a basis for $Ker A$, $v_1, \ldots, v_{n-k}$ and extend it to a basis of $R^n$, $w_1, \ldots w_{k}$. The images of $Aw_1,.., A w_k$ mod $\mathfrak m$ are linearly independent and contained in $Ker A$ mod $\mathfrak m$. We may assume that $Aw_i = v_i$ mod $\mathfrak m$. Wrt this basis, $A$ looks like a block matrix $(0 B//0 D)$, where the top $k\times k$ square of $B$ is congruent to $1$ mod $\mathfrak m$ ( i hope i got this right), hence this top right corner is invertible. By plugging in the relation $A^2=\lambda A$ and looking at the top right $k\times k$ corner, we get $D=\lambda \times (identity)$, which implies the claim.

