Let $R$ be a commutative ring (with $1$), and $M$ be an $n\times n$ matrix over $R$ whose characteristic polynomial is
$$\det(tI - M) = (t-\alpha\_1)\cdots(t-\alpha\_n)$$
with $\alpha\_i \in R$ for all $i$. Assume that $\alpha\_i - \alpha\_j \in R^\times$ whenever $i\ne j$. Is it true that there is some invertible $P \in GL\_n(R)$ with
$$M = P\begin{pmatrix}\alpha\_1 & & & \\ & \alpha\_2 & & \\ & & \ddots & \\ & & & \alpha\_n\end{pmatrix}P^{-1}?$$

This is true if $R$ is a field. The proof [here](https://math.stackexchange.com/a/270572/214497) shows that we must have $R^n = \oplus\_{i=1}^n \ker(M - \alpha\_i I\_n)$, at least in the case when $R$ is a local ring (but also it seems to work for general $R$). But would it follow that we can write $M$ in the form above? It is not clear to me that each $\ker(M - \alpha\_i I\_n)$ is free (if $R$ is not local), so I am not sure if we can necessarily find a basis of $R^n$ consisting of eigenvectors of $M$.

If the above is false, might there be some conditions on $R$ that would make it true, e.g. if we assume $R$ is an algebra over a field?