The core rule, rooted in the mishnah of Bekhorot 13:1, is that partnership with a non-Jew exempts an animal from the bechor obligation, since the pasuk requires that the firstborn status apply 'in Israel' and not to others, and Mishneh Torah, Firstlings 4:1 codifies that even a share as small as one part in a thousand held by the non-Jew in the mother or the fetus suffices to exempt it.
Shulchan Arukh, Yoreh De'ah 320:2 and Arukh HaShulchan, Yoreh De'ah 320:3 affirm this same halacha, explaining that only when the entire ownership belongs to Jews does the animal fall under the language of 'peter rechem bivnei Yisrael,' so that a gentile's share, even in one limb of the mother or offspring, removes the sanctity of the bechor.
The Gemara in Bekhorot 3b:10 records the dispute of Rabbi Yehuda and the Rabbis over whether an animal owned in partnership with a gentile is nonetheless obligated, but rules that no one is concerned with Rabbi Yehuda's stringent position, and Minchas Shlomo Tinyana 86 extends this principle, stating that an animal owned by a non-Jew is exempt from the bechor obligation even if its offspring is entirely a Jew's, indicating that it is the ownership of the mother herself, not mere acquisition of the offspring, that determines the exemption, unlike maaser behemah which does not depend on birth.
Bekhorot 16b:8 grounds this exemption in the concept of 'yad akum ba'emtza' — that wherever a gentile's hand is in the middle of the ownership, such as where he could seize the animal or its offspring for an unpaid debt, the firstborn is exempt from bechor status.
Later commentators such as the Tur, Yoreh De'ah 320, the Bach, Yoreh De'ah 320:2, the Beit Yosef, Yoreh De'ah 320:3, and the Shakh (Yoreh De'ah 320:3) all work out precisely how small or how significant the non-Jew's share must be — whether an ear, a limb, or an unspecified fractional share — to trigger the exemption, while Peninei Halakhah, Kashrut 19:7 restates the basic principle that partnership with a non-Jew removes the sanctity of the bechor even where all other partners are Jewish.