I ran across this argument today in an article bristling with insight, by a Messianic Jew, Reb Yhoshua, entitled, The Oral Torah and the Messianic Jew. In my resulting paper, Biblical Evidence for the Oral Torah (Hence, by Analogy, Oral Apostolic Tradition), I noted (from the article) that his teaching on visual lust and on prayer (in the Sermon on the Mount) look to be almost direct citations, or at least strong reflections of the thought, of portions of the Talmud, which was an encapsulation of Jewish traditions: much of which were believed to have been passed down as oral Torah: initially received by Moses on Mt. Sinai, along with the written law.
In the same passage on lust, where a "hand" causing trouble is mentioned, Reb Yhoshua noted that this may very well hearken back to a talmudic injunction that was clearly about masturbation. First, let's look at the passage (RSV):
Matthew 5:28-30 But I say to you that every one who looks at a woman lustfully has already committed adultery with her in his heart.  If your right eye causes you to sin, pluck it out and throw it away; it is better that you lose one of your members than that your whole body be thrown into hell.  And if your right hand causes you to sin, cut it off and throw it away; it is better that you lose one of your members than that your whole body go into hell.
It had never occurred to me in 34 years of committed Christianity, and seeing this passage countless times, to see an indication of masturbation here, but now that someone suggests it, it makes perfect sense. Context is everything. Verse 30 (so I had thought) was moving onto another subject matter (hence I made no connection).
But now it seems more sensible that the topic remains within the general subject of sexuality and marriage, since Jesus continues after this, discussing divorce in the following two verses. A "flow" of 1) lust / adultery, 2) some kind of (unspecified) sin with the hand, and 3) marriage and divorce, doesn't make much sense. What sin with the hand? What would Jesus mean? But the second of three prohibitions referring to masturbation does seem a great deal more plausible in context. Jewish traditional background makes the merely plausible become quite likely. Reb Yhoshua comments (footnote incorporated):
Some, understanding that vv. 27-30 are all teachings on lust, have suggested Jesus condoned castration. Origen, for example, castrated himself to fulfill Jesus’ command.. . . Jesus certainly didn’t mean for his followers to emasculate themselves. G-d forbade the Israelites to subject even their animals to painful castration. (Lev. 22:24) Mention of cutting off one’s hand within the context of a teaching on lustful thoughts and improper glances was simply a quote from the oral Torah, “The hand that frequently touches [the genitals]…in the case of a man, should be cut off.” [Mishnah Nidah 2:1] Jesus was using the same hyperbole with his audience that G-d used with Moses to communicate the sinfulness of masturbation. It is extremely unlikely that he ever intended for any kind of amputation to take place.
An article on "Kosher Sex" at the Judaism 101 website confirms this:
Jewish law clearly prohibits male masturbation. . . . Jewish law . . . forbids any act of ha-sh'cha'tat zerah (destruction of the seed), that is, ejaculation outside of the vagina. In fact, the prohibition is so strict that one passage in the Talmud states, "in the case of a man, the hand that reaches below the navel should be chopped off." (Niddah 13a)
[see a translation of the entirety of Tractate Niddah, 13, from the Babylonian Talmud. It translates the same phrase: "Whosoever puts his hand below his belly that hand shall be cut off" (13b). The same section has the following statement: "It was taught at the school of R. Ishmael, Thou shalt not commit adultery [Ex. XX, 13] implies, Thou shalt not practise masturbation either with hand or with foot."]
With this previous Talmudic terminology and tradition brought to bear on the subject, not just of a hand "cut off" but also a tie-in of masturbation as a species of adultery absolutely forbidden, it seems clear that Matthew 5:30 was referring to masturbation. Thus, Jesus condemned it in no uncertain terms (virtually making it a variant of the adultery prohibited in the Ten Commandments), while not suggesting a literal amputation (since it was understood in the culture as hyperbole). The strong hyperbolic visual was the ancient Jewish literary way of expressing the thought, "this is really really bad and immoral. Don't do it!"
Moreover, it is another instance of Jesus acknowledging the authority of the original oral Torah, that was later summarized in the Talmud. Jesus observed Pharisaic regulations and teaching (Matthew 23:2); hence He accepted the oral law as a matter of course, and consistently opposed the Sadducees, who denied that an oral law was passed down as a set of traditions: originally received by Moses from God on Mt. Sinai.