The genealogy in Matthew’s Gospel lists several non-Hebrew ancestresses of Jesus. That doesn’t vitiate what I understand to be your point, I don’t think being overinvested in “pure” biology is helpful.
As far as I can tell we aren’t told Tamar’s ethnic background (Hebrew or Canaanite). Rahab was evidently a Canaanite as a resident of Jericho. Bathsheba/Bathshua, who had been the wife of Uriah the Hittite, was evidently an Israelite based on her father’s name.