Commutative rings whose proper ideals decompose into local modules