I found the answer in this book (in Section $6.4.14$, “Determinants, Ranks and Linear Equations”). I'd tried using a similar Laplace expansion myself but was missing the idea of using the largest dimension at which the minors are not all annihilated by the same non-zero element. I'll try to summarize the argument in somewhat less formal terms, omitting the tangential material included in the book.
Let $A$ be an $m\times n$ matrix over a commutative ring $R$. We want to find a condition for the system of equations $Ax=0$ with $x\in R^n$ to have a non-trivial solution. If $R$ is a field, various definitions of the rank of $A$ coincide, including the column rank (the dimension of the column space), the row rank (the dimension of the row space) and the determinantal rank (the dimension of the lowest non-zero minor). This is not the case for a general commutative ring. It turns out that for our present purposes a useful generalization of rank is the largest integer $k$ such that there is no non-zero element of $R$ that annihilates all minors of dimension $k$, with $k=0$ if there is no such integer.
We want to show that $Ax=0$ has a non-trivial solution if and only if $k\lt n$.
If $k=0$, there is a non-zero element $r\in R$ which annihilates all matrix elements (the minors of dimension $1$), so there is a non-trivial solution
$$A\pmatrix{r\\\vdots\\r}=0\;.$$
Now assume $0\lt k\lt n$. If $m\lt n$, we can add rows of zeros to $A$ without changing $k$ or the solution set, so we can assume $k\lt n\le m$. There is some non-zero element $r\in R$ that annihilates all minors of dimension $k+1$, and there is a minor of dimension $k$ that isn't annihilated by $r$. Without loss of generality, assume that this is the minor of the first $k$ rows and columns. Now consider the matrix formed of the first $k+1$ rows and columns of $A$, and form a solution $x$ from the $(k+1)$-th column of its adjugate by multiplying it by $r$ and padding it with zeros. By construction, the first $k$ entries of $Ax$ are determinants of a matrix with two equal rows, and thus vanish; the remaining entries are each $r$ times a minor of dimension $k+1$, and thus also vanish. But the $(k+1)$-th entry of this solution is non-zero, being $r$ times the minor of the first $k$ rows and columns, which isn't annihilated by $r$. Thus we have constructed a non-trivial solution.
In summary, if $k\lt n$, there is a non-trivial solution to $Ax=0$.
Now assume conversely that there is such a solution $x$. If $n\gt m$, there are no minors of dimension $n$, so $k\lt n$. Thus we can assume $n\le m$. The minors of dimension $n$ are the determinants of matrices $B$ formed by choosing any $n$ rows of $A$. Since each row of $A$ times $x$ is $0$, we have $Bx=0$, and then multiplying by the adjugate of $B$ yields $\det B x=0$. Since there is at least one non-zero entry in the non-trivial solution $x$, there is at least one non-zero element of $R$ that annihilates all minors of size $n$, and thus $k\lt n$.
Specializing to the case $m=n$ of square matrices, we can conclude:
A system of linear equations $Ax=0$ with a square $n\times n$ matrix
$A$ over a commutative ring $R$ has a non-trivial solution if and only
if its determinant (its only minor of dimension $n$) is annihilated by
some non-zero element of $R$, that is, if its determinant is a zero divisor or zero.
Let $f: R\rightarrow R'$ be a ring homomorphism. We assume that $R$ and $R'$ both have an identity. Since $0 \in\ker(f)=\{x\in R\mid f(x)=0\}, \ker(f)$ is non-empty.
Let $u,v \in \ker(f), r \in R$, then $f(ru)=f(r)f(u)=0,\ f(ur)=f(u)f(r)=0,\ f(u-v)=f(u)-f(v)=0$.
Best Answer
I can't say for sure but I feel like this is a difficult question to answer in general. As mentioned in a comment, we will have to exclude $I=R$ otherwise the only ring with this property will be $R=0$. Additionally, I will just assume $R\neq0$.
I'll first provide a quick argument as to why $\Bbb Z$ cannot satisfy property (2). In corollary A below I provide a necessary and sufficient condition for property (2) to hold in general, but I'm not sure what to do about property (1).
Note that when considering property (2), we will only be considering those $M$ which have $R$ as a subring: indeed, just by taking $I = (0)$, we would need an embedding $R\hookrightarrow M$, so we may as well identify $R$ with its image in $M$.
Claim: Fix $0\neq R\subseteq M$. If property (2) holds, then the image of the unique homomorphism $\Bbb Z\to R$ is a field. In particular, a necessary condition for (2), and thus (1), is that $R$ contains a field as a subring.
Corollary: There does not exist a ring $M$ for which $\Bbb Z$ will satisfy property (2).
However, I'm not sure if I can say much more in this level of generality, because it seems like all sorts of rings can have these properties. A trivial example would be if $R$ is a field, since then the only proper ideal is trivial and thus the identity map on $R$ suffices to show $R$ has property (1). However, these aren't the only examples:
Example: If $R=\Bbbk[x]$ for $\Bbbk$ a field, then $R$ cannot satisfy property (1), but satisfies property (2).
Remark. The argument showing that $R$ cannot satisfy property (1) readily generalises to show that an integral domain cannot satisfy property (1) unless it is a field.
Note. If we relax condition (1) to only concern itself with prime ideals, then $R=\Bbbk[x]$ will satisfy this weaker condition whenever $\Bbbk$ is algebraically closed.
This construction was really just a tensor product (coproduct) of $\Bbbk$-algebras $M = \bigotimes_{I\subsetneq R}R/I$. In fact, we can perform this construction in general, though it won't always work (for example, $\bigotimes_n\Bbb Z/n\Bbb Z=0$ because all the rings in question have different characteristic). That being said, we can say this:
Claim: If $R$ satisfies property (2), then we may take $M := \bigotimes_{I\subsetneq R}R/I$, as a tensor product of $\Bbb Z$-algebras.
Corollary A: $R$ has property (2) iff the canonical inclusions $R/J\to\bigotimes_{I\subsetneq R}R/I$ are injective for all $J\subsetneq R$, where the tensor product is taken over $\Bbb Z$-algebras.
Remark. In fact, this same argument can be used to prove a slightly more general result: if $R$ is a commutative ring, and $\Phi$ is some property for ideals (so far we used the property $\Phi(I)$ saying "$I$ is proper"), then there exists a ring $M$ such that any ideal $I$ satisfying $\Phi(I)$ is realised as the kernel of some ring homomorphism $R\to M$ iff for any ideal $J$ satisfying $\Phi(J)$, the canonical inclusion $R/J\to\bigotimes_{I:\Phi(I)}R/I$ is injective.
For example, we could take the special case $\Phi(J)$ saying "$J=I$" for some fixed ideal $I$, then this will just say that the ideal $I$ is the kernel of the canonical homomorphism $R\to R/I$. On the other hand, if $\Phi$ is "no constraint" (so that we include the ideal $I=R$), then the canonical inclusion $R\to\bigotimes_{I\subseteq R}R/I=0$ being injective forces $R=0$.
However, this doesn't mean that $R$ has property (1) if and only if $R\cong\bigotimes_IR/I$: we don't have to take such a large ring in general.
Example: The ring $R:=\Bbb C[x]/(x^2)$ has property (1) and is not isomorphic to $\bigotimes_IR/I$.
Remark. $R=\Bbbk[x]/(x^2)$ will always satisfy property (1), but if we take for example $\Bbbk=\Bbb Q$, then it will be isomorphic to $\bigotimes_IR/I$.