While "to wank
" means "to masturbate", the term "wanker" is seldom if ever used in British slang to denote "one who wanks". It is quite wrong to infer from somebody's being a wanker that they in fact wank (and vice versa), but of course, fair to assume they do in any case. Herein lies the genius of the insult: if you call someone a wanker, it's probably true, but only literally.
I suppose it all originates from our repressed Victorian sexualities, from back when everybody thought they were the only ones to suffer the secret shame of being an actual wanker.
Most children these days learn the word "wanker" long before they learn its literal meaning.