When 1*b = b for all b in M, the module M is a unitary module. This happens iff the image rm is all of M.
Any module M can be written as the direct product of modules U cross V, where U is unitary. Let U be the image 1*M, which is a unitary module. Let V be the subset of M satisfying 1*V = 0. Verify that both U and V are submodules. Their only intersection is 0.
For any x in M, let y = x-1*x, so that 1*y = 0, and y is in V. Thus x = 1*x+y, the sum of two elements taken from U and V.
Suppose x has multiple representations. Subtract the two representations and multiply by 1. This shows their U components must agree. Subtract these away, and their V components must agree. The decomposition of x is unique, and M = U cross V.
Verify that elements of M are added and scaled in concert with their components in U and V. Therefore M is the direct product of U and V, as modules.