Because she was born from Sora, she has powers over his memories and those directly connected with his heart.
Like, for example, because Sora and Leon's hearts are connected, Namine could alter both of their memories through that connection. Does that make sense?
Yeah, that makes sense.