All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Scholars held different views regarding the ruling on cutting the hair or clipping the nails for whoever is offering a sacrificial animal. The Hanbalis maintained that it is prohibited for the one who wants to offer a sacrificial animal to remove anything of his hair or nails during the first ten days of Thul-Hijjah until he slaughters the sacrificial animal. Based on the Hanbali view, it is quite clear that when carrying out a recommended act, i.e. cutting hair and nails after forty days, clashes with avoiding a prohibited act, i.e. cutting hair or clipping the nails for the one who is offering a sacrificial animal, there is no doubt that avoiding the prohibited act should be given priority over carrying out the recommended act.
However, the majority of Muslim scholars held that it is only disliked (not prohibited) for the one who wants to offer a sacrificial animal to remove anything of his hair or nails during the first ten days of Thul-Hijjah until he slaughters his sacrificial animal. Please, refer to fatwa 28946. Based on their view, the disliked act can be tolerated in case of need. Hence, they maintained that it is permissible for the one who needs to cut his hair or clip his nails before offering his sacrificial animal to do so and that such an act is not disliked for him in this case (given the need for it).
Asna Al-Mataalib (a Shaafi'i book) reads:
"It is disliked for the one who wants to offer a sacrificial animal to remove anything of his hair or nails starting from the first day of Thul-Hijjah until he offers his sacrificial animal because the Prophet said, 'If anyone has an animal to offer as a sacrificial animal (on Eid Al-Adhha), then he should not cut anything of his hair or nails after he has entered the first ten days of Thul-Hijjah.' [Muslim] Another version reads, 'If you see the crescent of Thul-Hijjah and one of you intends to offer a sacrifice, then he should not cut his hair or nails until he has sacrificed it.' It is disliked to do otherwise when there is no need for cutting the hair or nails, as advised by some scholars including Az-Zarkashi ."
Based on this view, when a person who is offering an animal sacrifice needs to cut his hair or nails after forty days or even before that, then it is not disliked for him to do so during the first ten days of Thul-Hijjah in this case. However, it is recommended for the person (offering an animal sacrifice) who does not need to cut his hair or nails to avoid cutting them even after the prescribed forty days according to the apparent indication of the scholars' statements in this regard.
Allaah knows best