Random House Dictionary 2009
1. withdrawal of the penis in sexual intercourse so that ejaculation takes place outside the vagina; coitus interruptus.
1720–30; after Onan, son of Judah (Gen. 38:9); see -ism
Mirriam-Webster's Medical Dictionary
1 : MASTURBATION
2 : COITUS INTERRUPTUS —onan·is·tic /"O-n&-'nis-tik/ adjective
Onan /'O-n&n/, Biblical character. In the Book of Genesis Onan was commanded by his father to impregnate the widow of hisslain brother and to raise the offspring of the union. In order to avoid raising descendants for his late brother, however, Onan engaged in coitus interruptus.
The Concise Oxford Dictionary of World Religions
Onanism. Coitus interruptus, unnatural sexual intercourse or masturbation. In the Jewish tradition, onanism is associated with the biblical figure Onan who was condemned by God for spilling his seed ‘on the ground’ (Genesis 38. 7–10).
Basically, from what I've found, every definition of the word--and even reference to it--has said Onan is infamous for masturbating OR pulling out. I haven't found one single legit exapmle of where it only means masturbating.
EVEN the Roman Catholic Church uses the story of Onan to justify banning BOTH masturbation and coitus interruptus. And more recently, also contraception.
The only ones who really thought it only referred to masturbation were the early rabbis, but Levitical regulations concerning ejaculation cleared that up, saying that ANY ejaculation, be it due to intercourse, maturbation or nocturnal emission merely need to be cleaned up with some good old ritual washing.
Only really in popular culture, and by crazy Christians has this been taken waaay out of context. Clearly anyone with a brain knows that Onan pulled out, and that he was disobeying God's rules and not treating the seed as sacred and for procreation blah blah and that's why God was mad at him.
Oddly enough, the only other languages I could find that had a cognate were French, onanisme (f) and Russian онанизм.