Does undergoing an endoscopy during the day in Ramadan affect the validity of fasting?
Undergoing an endoscopic procedure during the day in Ramadan—whether through the mouth, nose, front private part, or back private part—invalidates the fast.
Whoever undergoes such a procedure must refrain from eating and drinking for the rest of the day out of respect for the sacred month and make up for that day after Ramadan.
What is the ruling if hemorrhoid blood exits after completing ablution?
If this blood is exiting from outside the anus (due to the hemorrhoid protruding), it does not invalidate ablution, because blood exiting from the body from other than the two orifices does not invalidate ablution. If it exits from the anus (meaning from inside it), it invalidates ablution, and one must perform istinja' from it, wash the area of impurity, and repeat the ablution.
However, if this blood exits continuously such that no time remains sufficient for purification and prayer without it flowing, then it takes the ruling of urinary incontinence (sals al-bawl). One then cleanses from it after the time for each prayer enters, performs ablution immediately thereafter, and performs the obligatory prayer immediately. There is no liability upon him after that if something of it flows, and he may pray as many voluntary prayers as he wishes. If he wants to pray another obligatory prayer, he must cleanse himself and perform ablution. And Allah the Almighty knows best.
Is it permissible for one who sacrifices on behalf of another, with the latter's permission, to eat from the sacrifice?
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
It is permissible for one who sacrifices on behalf of another with his permission to eat from the sacrifice with his permission, and he takes his place in distributing its meat.
It is stated in Hashiyat al-Jamal 'ala Sharh al-Minhaj (Vol.5/P.262): 'If a person sacrifices on behalf of a living individual with his permission, does he take the place of that individual in distributing the meat, because permission for the sacrifice implies permission for distribution, or does it depend on explicit permission? There is room for consideration, but the former view is not far-fetched.' And Allah Almighty knows best."
Is it a condition for I‘tikaf to be performed in the mosque?
Yes, for I‘tikaf to be valid, it must be performed in a mosque. I‘tikaf is not valid if performed at home or elsewhere.