Just a little more information with regards to your first question.
Canonical modules make sense for any local ring with a dualizing complex (for example, a complete ring). In that case, I would define the canonical module to be the first nonzero cohomology of the dualizing complex. If the ring is not Cohen-Macaulay . They don't however they need not always localize well in that case however (things are fine in a domain regardless). For example, the canonical module of the ring
$$R = k[[x,y,z]]/\langle x \rangle \cap \langle y, z \rangle$$
is only be supported at one of the minimal primes of $R$. The dualizing complex behaves better though.
In the non-local setting, even weirder things can happen (even in domains).

