Experience Share and/or switching out and one of Norman's Pokemon. He eventually got the clue that Growl wasn't gonna do anything, so he went to Norman (since he lent him the Zigzagoon in the first place) for a Pokemon to use just until his Ralts learned Confusion. He then went back to the area where he first caught Ralts and used the "start with Ralts, switch out for Norman's Pokemon" to give it enough experience to get Confusion. Then, of course he gave it back to Norman.
Either that, or Wally has insider knowledge of the Rare Candy black market.