Riku definitely forgot, probably some time after they captured Roxas, because during the fight he declares, "You really are his Nobody." I'm more inclined now to believe the speculation that something went wrong with Namine trying to restore Sora's memory, and she needed to make everyone forget in order for it to work. But she would still remember him, because she's the one calling the shots. And DiZ had never personally met Sora, so he wasn't a part of Sora's chain of memories.
I think they put that line in there to make us think along those lines. My guess is that she's telling Riku that she remembers the names of the friends he told her about previously. For example:
Riku: I'm doing this so I can be back with my friends. You know, So-
Xion: I remember, Sora and Kairi.
Maybe not exactly those lines, but you get the idea. Only they cut out Riku, so we're left thinking that she remembers them from a previous life.