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.
Offering a sacrifice on the days of ‘Eed Al-Adhha is a confirmed Sunnah and not an obligation according to the view of the majority of the scholars as we clarified in Fataawa 117208 and 81799. Even according to the view that it is an obligation, it becomes an obligation on a well-off person but not on a poor person who is unable to offer it. Therefore, you are not obliged to borrow money in order to offer a sacrifice, however, if you borrow money to offer a sacrifice, it is valid and sufficient and we ask Allaah to accept our good deeds and yours.
Shaykh-ul-Islam Ibn Taymiyyah was asked about a person who cannot offer a sacrifice, whether he should borrow money for this effect, and he replied: “If he is able to repay the debt and he borrows the money by which he would offer a sacrifice, then this is good but he is not obliged to do so.”
Moreover, Shaykh Ibn ‘Uthaymeen was asked: “Is it permissible for a poor person to borrow money in order to offer a sacrifice, and he replied: “There are some details about this: a poor person who has no money when the ‘Eed Al-Adhha comes but he hopes to get some money, like a person who has a monthly salary and it coincided that on the day of ‘Eed he has no money at hand but he can borrow money from someone and he will repay him when he receives his salary, then we say for such a person that he may borrow money and offer the ‘Eed sacrifice and then repay his debt. However, if he has no money to repay in the near future, then we say to him that it is not desirable for him to borrow money in order to offer a sacrifice as this necessitates being liable for the debt and the people regarding it as a favour upon him, and he does not know whether or not he can be able to repay.”
Of course, this is if you mean that you borrowed money in order to offer a sacrifice. However, if you mean that you have debts and you are inquiring whether it is permissible for you to offer a sacrifice before repaying your debts, then the answer is that repaying a debt is an obligation if its time is due because the sacrifice is just a Sunnah as we already clarified and it is not permissible to neglect an obligation in order to perform a Sunnah. Therefore, it is an obligation to carry out this debt and it is not permissible to give priority to the sacrifice over the debt unless the creditor gives you permission or that its time is not yet due.
Allaah Knows best.