You don't need to search the hadith in order to find the meaning of the term "your right hand possess". Apparently the Quran mentions the term at several other places, 15 to be exact and the meaning of the term is made clear to that of a "female slave". Contrary to that however there is no verse or hadith which states the term "your right hand possess" means your private parts.
Quran 4:24-25: And [also prohibited to you are all] married women except those your right hands possess. [This is] the decree of Allah upon you. And lawful to you are [all others] beyond these, [provided] that you seek them [in marriage] with [gifts from] your property, desiring chastity, not unlawful sexual intercourse. So for whatever you enjoy [of marriage] from them, give them their due compensation as an obligation. And there is no blame upon you for what you mutually agree to beyond the obligation. Indeed, Allah is ever Knowing and Wise. And whoever among you cannot [find] the means to marry free, believing women, then [he may marry] from those whom your right hands possess of believing slave girls. And Allah is most knowing about your faith. You [believers] are of one another. So marry them with the permission of their people and give them their due compensation according to what is acceptable. [They should be] chaste, neither [of] those who commit unlawful intercourse randomly nor those who take [secret] lovers. But once they are sheltered in marriage, if they should commit adultery, then for them is half the punishment for free [unmarried] women. This [allowance] is for him among you who fears sin, but to be patient is better for you. And Allah is Forgiving and Merciful.
Other places include Quran 23:6 and 70:30 both, in identical wording, draw a distinction between spouses and "those whom one's right hands possess" (female slaves), saying " أَزْوَاجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَانُهُمْ" (literally, "their spouses or what their right hands possess"), while clarifying that sexual intercourse with either is permissible.
The expression "ma malakat aymanukum" is the most common of the seven separate terms used in the Quran to refer to slaves. The Quranic vocabulary for slaves is significantly different from classical Arabic, where the most common terms for slave are ‘abd (used in the Quran mainly in the sense servant/worshipper of God) and raqiq (not found in the Quran).
The Quran treats slavery and freedom not as part of the natural order but admits it is indeed a happening as was the nature of humans from the beginning, and states this distinction as an example of God's grace. It regards this discrimination between human beings as in accordance with the divinely established order of things and to undermine this order is to act against God.
The Quran acknowledges slaves as a category of humans. The verses at 2:178 and 4:176 of the Quran explicitly states at least three distinct and unequal categories of human beings I-e free, slaves and women.
Regarding the last part of your question where you have asked whether it is better to have sex with a slave girl rather than to masturbate alone. A deduced Islamic opinion is affirmative. The purchase of female slaves for sex is lawful from the perspective of Islamic law, and this has been one of the most common motive for the purchase of slaves throughout Islamic history. However, Islam prohibits from compelling slaves for the purpose of prostitution. So, you cannot rent a girl for sex but need to own one.
Quran 23:33 And do not compel your slave girls to prostitution
The prophet Muhammad pbuh himself had sex with slaves such as Maria Al-Qubtia and Rehana. Maria Al-Qubtia even bore him a child named after the prophet Abraham.
Therefore, its been understood by most schools of taught that masturbation is prohibited and Quran distinctively allows sex with a female slave.