If we assume that $\text{Spec}(R)$ is connected, then $R$ is always a field (note the spectrum of a local ring is always connected). This is equivalent to the nonexistence of nontrivial idempotents. Indeed, over a commutative ring any simple $R$-module is also of the form $R/\mathfrak m$ for a maximal ideal $\mathfrak m$ of $R$. Write $R = R/\mathfrak m \oplus I$, for some finitely generated ideal $I$ of $R$. By the determinant trick, there is an $x\in R$ with $x-1\in I$ such that $xI = I$, hence $I = I^2$. This implies $I$ is generated by an idempotent, hence $I = 0$, since $R/\mathfrak m$ is nonzero.