The gemarah (yevamos 34b) indicates that Er slept with Tamar sh'lo k'darka. If this is the case how was Er ever married to Tamar if the injunction of the pasuk וְדָבַק בְּאִשְׁתּוֹ (Bereshis 2:24) is not fulfilled?
There is no question that Er was married to Tamar as indicated in Bereshis 38:8, the easiest way to answer this question is to say that Er and Onan had a din of a ben Yisroel, not a ben Noach, even before Matan Torah. Based on this assumption it would be a question of if kiddushin is chal on chayvei la'vim which it is(as opposed to if they were b'nei noach it would be chayvei misah).
to really be m'varer this sugya you need to see the summary in the sefer Mitzvos Hashem Bara on Vayishlach (appended to this work). The maare mekomos include:
1) beis halevi al hatorah - vayishlach 18b - regarding was there any issur involved in the rape of Dena (sh'lo k'darko)
2) gemara in nedarim 20b and the Ra"N there which asserts that the heter of sh'lo k'darko was a chiddush of matan torah (ki yikach isha)
3) Sanhedrin 58b - which prohibits a ben noach from having relations with his wife sh'lo k'darko (opinion of R' Chanina)
4) R' Yehuda Rosnish (baal Mishne L'Melech) Sefer Parshas Derachim, Derush Rishon, derech ha'atarim 10a - who discusses your question with Tamar specifically and leaves it as a tzarich iyun!
5) however R' Dovid Prado is cholek and proves that Er and Onan clearly didn't have a din of Ben Noach as far as this inyan because the pasuk testifies that Tamar was married to Er (eshes achicha - bereshis 38:8, mentioned above)
6) maharal B'er HaGolah b'er 2
The Gemarah in Yevamot 55b says that all ביאה works even it is done שלא כדרכה. (Tosafot on 20a s.v. יבא say that the reason is that the people having ביאה need to be able to impregnate/be impregnated, not that the act of ביאה needs to be able to impregnate.) The one exception is a שפחה חרופה, as that needs שכבת זרע to be חייב (learned out on Yevamot 55a/b). Being that this is so, the ביאה needed for קידושין need not be כדרכה, and ער was indeed קונה though קדושי ביאה.