I'm an Italian Noahide. The issue in question manifests my purely intellectual interest, concerning the Jews and not the Gentiles.
In Contemporary Halakhic Problems, Vol II, Part II, Chapter XIII The Prohibition against Intermarriage 42 , Rabbi Judah David Bleich says :
(…)Deuteronomy 23:18: "Lo tiheyeh kedeshah mi-benot Yisra'el ve-lo yiheyeh kadesh mi-benei Yisra'el." This passage is rendered in standard English translation as "There shall be no harlot of the daughters of Israel, neither shall there be a sodomite of the sons of Israel”. Rashi, following one opinion presented in Sanhedrin 54b, does indeed understand the term "kadesh" as referring to a male prostitute who makes himself available for homosexual activity. Rambam, Sefer ha-Mizvot, lo ta'aseh, no. 350, records the latter part of this verse as an injunction against homosexual relations. However, this passage was not universally understood in this manner by Jewish exegetes. Rambam, Hilkhot Ishut 1:4, understands the first section of this verse as establishing a prohibition against fornication. Sexual intercourse between unmarried persons constitutes a violation of this commandment according to Rambam. Targum Onkelos translates this verse as follows: "No Jewish woman of the daughters of Israel shall marry a slave and no male of the children of Israel shall marry a female slave." Rabbi Maharam Schick and others point to the fact that the verse in the original Hebrew does not specify cohabitation with a slave. They observe that Targum Onkelos speaks of a slave simply as an example of the type of sexual liaison to which reference is made. Instead of rendering a literal translation the Targum offers an example of a sexual relationship between individuals who cannot be united in matrimony with the implication that all comparable relationships are likewise included in the prohibition. Fornication between an unmarried male and an unmarried female does not fall within the scope of this prohibition according to theTargum because such persons are eligible to contract a valid marriage. The prohibition, for the Targum, is limited to a situation in which matrimony is halakhically precluded but includes cohabitation between any male and female who are halakhically incapable of contracting a valid marriage. A liaison between a Jewish male and a non-Jewish female slave or between a Jewish woman and a male slave is merely an instance of such a relationship”.
According to Rabbi Bleich therefore, Targum interprets this precept of the Torah in the same way as the exegesis conducted on this passage by Nachmanides (see Critique of Sefer HaMitzvot; negative prohibition 355).
Rabbi Israel Drazin, author, together with Rabbi Stanley M. Wagner, of an English translation of Targum Onkelos published by Gefen Publishing House,however disagrees with Rabbi Bleich's opinion on the meaning assumed by the version of the Targum on this precept. This is what Rabbi Drazin says:
Deuteronomy 23:18 A woman of the daughters of Israel shall not become the wife of a slave, and no man of Israel may marry a bondwoman.
A WOMAN…BONDWOMAN. Onkelos entirely rewrites the Torah’s “No Israelite woman shall be a kedeishah, nor shall any Israelite man be a kadeish.” Ibn Ezra and Radak understand Scripture’s kedeishah and kadeish as “a readiness,” people ready to prostitute themselves with sex. However, since the basic meaning of kadosh is “distinct” and “set aside,” this may be the basis for the term of these cult prostitutes. Why did our targumist rewrite this verse into an idea that the Bible does not seem to suggest? The answer may lie in the definition of kedeishah and kadeish. The targumist may have felt that a woman becomes a kedeishah, “separated” from all other Israelites, if she marries a male slave; and a man does so if he marries a female slave, because by joining the slaves, they have given up their dignity and, perhaps, for the female Israelite at least, her status as a free Israelite . Nachmanides views our verse in a different manner. He suggests that Scripture is warning courts to eliminate prostitution, whether by males or females. This teaching is in the Babylonian Talmud, Kiddushin 68a, 69a, and Maimonides, Mishneh Torah, Issurei Biah 2:13.
Why did the Onkelos rewrite verse 18? Several ideas beyond those in the commentary have been suggested: Aberbach and Grossfeld (in Targum Onkelos to Genesis) point out that Onkelos’s interpretation may have been influenced by the fact that in talmudic times there was no conceivable danger of Jewish cult prostitution. Churgin (Halakhah, page 92) suggests that our targumist did not translate this verse according to its plain meaning, but speaks about the prohibition against marrying a slave, in order to censure the Hasmonean family for marrying into the family of Herod, a descendant of slaves. Melammed (Bible Commentators, page 197) believes the targumist may be reflecting a lost Midrash. Schefftel (Biure Onkelos) states that the biblical language is subject to several interpretations, but since the targumist wrote for popular consumption, he includes a reading that would be most meaningful to the people. Pseudo-Jonathan has “You must not profane your daughters to make them harlots, nor may any man of Israel debase himself by fornication.” Neophyti and the Septuagint are literal, rendering the two words as “female and male prostitute.” See also Komlosh (Hamikra, page 166, note 4), where the literature on this subject is cited, as well as the Babylonian Talmud, Keritot 3a and Sanhedrin 54b.
Taking into account the positions reported by Rabbi Drazin, I therefore ask you: how much is really shared in the Jewish tradition Rabbi Bleich's exegesis about this version that Targum gives about Deuteronomy 23:18 ?