So as seen on this question Converse of the Chinese Remainder Theorem, we know that if $(n,m) \neq 1$, then $\mathbb{Z} /mn \mathbb{Z} \ncong \mathbb{Z}/n\mathbb{Z} \times \mathbb{Z}/m\mathbb{Z}$, because the right hand side does not have an element of order $nm$.
But take a more general setting. Let $R$ be a commutative ring, and let $A,B$ be ideals in $R$. $A$ and $B$ are said to be comaximal if $A+B=R$. If $A, B$ are comaximal, then we have: $R/AB \cong R/A \times R/B$. In this setup, is the converse true?
If we have $A, B$ ideals in $R$ such that $R/AB \cong R/A \times R/B$, do we always have that $A$ and $B$ are comaximal?