When does the modular law apply to ideals in a commutative ring

Such domains are known as Prüfer domains. They are non-Noetherian generalizations of Dedekind domains. Their ubiquity stems from a remarkable confluence of interesting characterizations. For example, they are those domains satisfy either the Chinese Remainder Theorem for ideals, or Gauss's Lemma for polynomial content ideals, or for ideals: $\rm\ A\cap (B + C) = A\cap B + A\cap C\:,\ $ or $\rm\ (A + B)\ (A \cap B) = A\ B\:,\ $ or $\rm\ A\supset B\ \Rightarrow\ A\:|\:B\ $ for fin. gen. $\rm\:A\:$ etc. It's been estimated that there are close to 100 such characterizations known, e.g. see my sci.math post for 30 odd characterizations. Below is an excerpt:

THEOREM $\ \ $ Let $\rm\:D\:$ be a domain. The following are equivalent:

(1) $\rm\:D\:$ is a Prüfer domain, i.e. every nonzero f.g. (finitely generated) ideal is invertible.
(2) Every nonzero two-generated ideal of $\rm\:D\:$ is invertible.
(3) $\rm\:D_P\:$ is a Prufer domain for every prime ideal $\rm\:P\:$ of $\rm\:D.\:$
(4) $\rm\:D_P\:$ is a valuation domain for every prime ideal $\rm\:P\:$ of $\rm\:D.\:$
(5) $\rm\:D_P\:$ is a valuation domain for every maximal ideal $\rm\:P\:$ of $\rm\:D.\:$
(6) Every nonzero f.g. ideal $\rm\:I\:$ of $\rm\:D\:$ is cancellable, i.e. $\rm\:I\:J = I\:K\ \Rightarrow\ J = K\:$
(7) $\: $ (6) restricted to f.g. $\rm\:J,K.$
(8) $\rm\:D\:$ is integrally closed and there is an $\rm\:n > 1\:$ such that for all $\rm\: a,b \in D,\ (a,b)^n = (a^n,b^n).$
(9) $\rm\:D\:$ is integrally closed and there is an $\rm\: n > 1\:$ such that for all $\rm\:a,b \in D,\ a^{n-1} b \ \in\ (a^n, b^n).$
(10) Each ideal $\rm\:I\:$ of $\rm\:D\:$ is complete, i.e. $\rm\:I = \cap\ I\: V_j\:$ as $\rm\:V_j\:$ run over all the valuation overrings of $\rm\:D.\:$
(11) Each f.g. ideal of $\rm\:D\:$ is an intersection of valuation ideals.
(12) If $\rm\:I,J,K\:$ are nonzero ideals of $\rm\:D,\:$ then $\rm\:I \cap (J + K) = I\cap J + I\cap K.$
(13) If $\rm\:I,J,K\:$ are nonzero ideals of $\rm\:D,\:$ then $\rm\:I\ (J \cap K) = I\:J\cap I\:K.$
(14) If $\rm\:I,J\:$ are nonzero ideals of $\rm\:D,\:$ then $\rm\:(I + J)\ (I \cap J) = I\:J.\ $ ($\rm LCM\times GCD$ law)
(15) If $\rm\:I,J,K\:$ are nonzero ideals of $\rm\:D,\:$ with $\rm\:K\:$ f.g. then $\rm\:(I + J):K = I:K + J:K.$
(16) For any two elements $\rm\:a,b \in D,\ (a:b) + (b:a) = D.$
(17) If $\rm\:I,J,K\:$ are nonzero ideals of $\rm\:D\:$ with $\rm\:I,J\:$ f.g. then $\rm\:K:(I \cap J) = K:I + K:J.$
(18) $\rm\:D\:$ is integrally closed and each overring of $\rm\:D\:$ is the intersection of localizations of $\rm\:D.\:$
(19) $\rm\:D\:$ is integrally closed and each overring of $\rm\:D\:$ is the intersection of quotient rings of $\rm\:D.\:$
(20) Each overring of $\rm\:D\:$ is integrally closed.
(21) Each overring of $\rm\:D\:$ is flat over $\rm\:D.\:$
(22) $\rm\:D\:$ is integrally closed and prime ideals of overrings of are extensions of prime ideals of $\rm\:D.$
(23) $\rm\:D\:$ is integrally closed and for each prime ideal $\rm\:P\:$ of $\rm\:D,\:$ and each overring $\rm\:S\:$ of $\rm\:D,\:$ there is at most one prime ideal of $\rm\:S\:$ lying over $\rm\:P.\:$
(24) For polynomials $\rm\:f,g \in D[x],\ c(fg) = c(f)\: c(g)\:$ where for a polynomial $\rm\:h \in D[x],\ c(h)\:$ denotes the "content" ideal of $\rm\:D\:$ generated by the coefficients of $\rm\:h.\:$ (Gauss' Lemma)
(25) Ideals in $\rm\:D\:$ are integrally closed.
(26) If $\rm\:I,J\:$ are ideals with $\rm\:I\:$ f.g. then $\rm\: I\supset J\ \Rightarrow\ I|J.$ (contains $\:\Rightarrow\:$ divides)
(27) the Chinese Remainder Theorem $\rm(CRT)$ holds true in $\rm\:D\:,\:$ i.e. a system of congruences $\rm\:x\equiv x_j\ (mod\ I_j)\:$ is solvable iff $\rm\:x_j\equiv x_k\ (mod\ I_j + I_k).$
(28) Each finitely generated torsion-free $\rm\,D$-module is projective.