The Rambam (Hil. Bikkurim 12:1) writes:
מצות עשה לפדות כל אדם מישראל פטר חמור בשה ואם לא רצה לפדותו מצות עשה
לעורפו שנאמר ופטר חמור תפדה בשה ואם לא תפדה וערפתו ושתי מצות אלו
נוהגות בכל מקום ובכל זמן ומצות פדייה קודמת למצות עריפה:
It is a positive commandment for every Jewish man to redeem the first
[male] issue of a donkey with a seh. If he does not desire to redeem
it, it is a mitzvah for him to behead it, as [Exodus 13:13] states:
"The first issue of a donkey you shall redeem with a seh. If you do
not redeem it, you shall decapitate it."
These two mitzvot apply in all places and at all times. The mitzvah
of redemption takes precedence over the mitzvah of beheading [the
donkey].
According to the Rambam, one fulfills a mitzvah by beheading, but redeeming has preference (and this parallels yibum and chalitzah). However, Raavad (ibid.) takes issue with Rambam's formulation:
ואם לא רצה לפדותו מצות עשה לעורפו. א"א בחיי ראשי אין זה מן הפלפול ולא
מן הדעת המיושבת שיחשוב זה במצות עשה אע"פ שאמרו מצות פדייה קודמת
למצות עריפה לא שתחשב מצוה אבל היא עבירה ומזיק נקרא ומפסיד ממונו של
כהן ומפני שאמר מצות פדייה אמר מצות עריפה
According to Raavad, one who beheads the donkey has committed a sin, destroyed property and caused a loss to the kohen. Although the Mishnah refers to the "mitzvah" of arifah, this is only because it has already referred to the mitzvah of pediyah, but arifah is not a mitzvah at all; it damaging something for no reason and an aveirah.
Interestingly, Raavad's father-in-law, R. Avraham b. Yitzchak Av Beit Din, held the view of the Rambam and not that of the Raavad. This is clear from his question, cited by the Avudraham, about which mitzvot one recites a blessing on. In his list of mitzvot for which he is unsure whether a blessing is recited, R. Avraham Av Beit Din refers to:
ופטר חמור בנתינתו ובעריפתו דתנן (בכורות יג, ב) מצוה פדיה קודמת למצוה
עריפה
Clearly, he maintains arifah is a mitzvah, but he is unsure whether it receives a blessing.
R. Yosef ibn Plat's response to this question supports the view of Raavad:
ושלוח הקן נמי מצוה הבאה בעבירה היא דכתיב "לא תקח האם על הבנים", ואם
לקחת, "שלח תשלח". וכן עריפת פטר חמור תפדה בשה, ואם לא תפדה וערפתו