Let $R$ be a ring. Can we have two $R$-module maps $A, B: R^n \to R^m$ such that $\mathrm{Ker}(A) \cong \mathrm{Ker}(B)$, $\mathrm{Im}(A) \cong \mathrm{Im}(B)$ and $\mathrm{CoKer}(A) \cong \mathrm{CoKer}(B)$, but such that there is no commutative diagram $$\begin{matrix} R^n & \overset{A}{\longrightarrow} & R^m \\ \cong && \cong \\ R^n & \overset{B}{\longrightarrow} & R^m \\ \end{matrix} \quad ?$$
Comments: I have examples where any two of kernel, image and cokernel match but the third doesn't. The trickiest is to get just the image different: Take $R = \mathbb{R}[x,y,z]/(x^2+y^2+z^2-1)$ and the matrices $\left[ \begin{smallmatrix} 1&0&0 \\ 0&1&0 \\ 0&0&0 \\ \end{smallmatrix} \right]$ and $\left[ \begin{smallmatrix} 1-x^2&-xy&-xz \\ -xy&1&-yz \\ -xz&-yz&1-z^2 \\ \end{smallmatrix} \right]$$\left[ \begin{smallmatrix} 1-x^2&-xy&-xz \\ -xy&1-y^2&-yz \\ -xz&-yz&1-z^2 \\ \end{smallmatrix} \right]$. To get just kernel or just cokernel different, use the same ring and the matrices $\left( \left[ \begin{smallmatrix} 1\\0\\0 \end{smallmatrix} \right], \left[ \begin{smallmatrix} x\\y\\z \end{smallmatrix} \right] \right)$ or $\left( \left[ \begin{smallmatrix} 1&0&0 \end{smallmatrix} \right], \left[ \begin{smallmatrix} x&y&z \end{smallmatrix} \right] \right)$
We can make short exact sequences $0 \to \mathrm{Ker}(A) \to R^n \to \mathrm{Im}(A) \to 0$ and $0 \to \mathrm{Im}(A) \to R^m \to \mathrm{CoKer}(A) \to 0$, giving classes $E_A \in \mathrm{Ext}^1(\mathrm{Im}(A), \mathrm{Ker}(A))$ and $F_A \in \mathrm{Ext}^1(\mathrm{CoKer}(A), \mathrm{Im}(A))$. One can show that the diagram exists if and only if one can choose the isomorprhisms between Ker, Im and CoKer to make $E_A = E_B$ and $F_A = F_B$. Thus, a closely related question is: Can you find a ring $R$, finitely generated $R$-modules $M$ and $N$ and two short exact sequences $0 \to M \to R^k \to N \to 0$ whose classes in $\mathrm{Ext}^1(N,M)$ are in different orbits for the action of $\mathrm{Aut}(M) \times \mathrm{Aut}(N)$? If we don't ask for the middle term to be free, there are counterexamples here and here, but I don't see how to tweak any of those counterexamples to make the middle term free.