let's look at Z_{12}.

since this is a cyclic ring, every ideal is of the form (a), for some a. so here are the ideals of Z_{12}:

(0) = {0}

(1) = Z_{12}, not maximal, not prime (by definition the entire ring is excluded from being a prime ideal)

(2) = {0,2,4,6,8,10} <---this is a maximal ideal.

(3) = {0,3,6,9} <---this is a maximal ideal.

(4) = {0,4,8} <--this is NOT a maximal ideal, as it is contained in (2).

(5) = (1) = Z_{12}(since 5*5 = 1 (mod 12))

(6) = {0,6} <---not maximal, contained in (3) and (2)

(7) = (1) (verify!)

(8) = {0,8,4} = (4) <--- not maximal

(9) = {0,9,6,3} = (3) <---maximal

(10) = {0,10,8,6,4,2} = (2) <---maximal

(11) = (1) (obviously since 11 = -1).

it should be clear that Z_{12}/(2) is isomorphic to Z_{2}, which is an integral domain (a field, in fact).

also Z_{12}/(3) is isomorphic to Z_{3}, also an integral domain.

so let's look at what happens for Z_{12}/(4) (note (4) is neither maximal, nor prime: we have 4 = 2*2 in (4), but 2 is not in (4)).

here are the cosets (equivalence classes):

(4) = 0 + (4)

1 + (4)

2 + (4)

3 + (4)

now (2 + (4))(2 + (4)) = 2*2 + (4) = 4 + (4) = (4) = 0 + (4), so 2 + (4) is a zero-divisor in Z_{12}/(4).

this tells us (by (c)) that (4) must not be a prime ideal of Z_{12}, and thus (a) tells us (4) cannot be maximal (but we knew that already, right?).

*********

the flaw in your reasoning is in assuming Z_{m}/I must contain 0-divisors for any I. yes if xy = m, then (x + I)(y + I) = xy + I = I. but with m = 12, we have the following possibilities:

x = 1, y = 0 <--then y + I = I

x = 2, y = 6 note that we have x in I for I = (2), and y in I for I = (3), which are the only maximal ideals of Z_{12}.

x = 3, y = 4 now x is in I for I = (3), and y is in I for I = (2).

we never have a situation where neither x NOR y is in a maximal ideal.