As a trivial example, consider this matrix whose entries lie in the ring $Z_6$, the integers modulo 6. $$ \left( {\begin{array}{cc}{1}&{2} \\ {0}&{3} \end{array}} \right) $$
If you reduce the matrix to integers modulo 2, it becomes the identity matrix, which trivially has rank 2 and is invertible.
If you reduce the matrix to integers modulo 3, the second row becomes zero, which makes it have rank 1, and singular.
Because of this, trying to invert the matrix within the ring $Z_6$ fails because you encounter a pivot that is a zero-divisor (viz. $3$) which you cannot get rid of.
Is there standard terminology for this situation? E.g. would you call the matrix 'partially invertible' or something more specific?
Is there a standard generalisation of matrix rank or nullity, and what would the rank of my example matrix be? Is the generalisation of rank simply that of considering each prime power divisor of the modulus as a separate problem and putting the resulting ranks in an ordered tuple?
Pointers to useful references are welcome too.
Background: I want to write something about the Lights Out game. Normally the lights in the game have 2 states, on&off. Solving that game in general then involves finding the (partial) inverse of a matrix over the field $Z_2$. If instead the lights have m states, then it is over the ring $Z_m$, and the issue above arises. So I want to know what useful terminology I could use.