Given a one-dimensional Cohen-Macaulay local ring (R, m, k), we prove that it is almost Gorenstein if and only if m is a canonical module of the ring m : m. Then, we generalize this result by introducing the notions of almost canonical ideal and gAGL ring and by proving that R is gAGL if and only if m is an almost canonical ideal of m : m. We use this fact to characterize when the ring m : m is almost Gorenstein, provided that R has minimal multiplicity. This is a generalization of a result proved by Chau, Goto, Kumashiro, and Matsuoka in the case in which m : m is local and its residue field is isomorphic to k.