Altruism (Al-Eethaar), an act of giving preference to others over oneself, is a virtue which Islaam permits or recommends but not in every aspect of our lives.
The scholars classified altruism into three:
b) The disliked, sometimes permissible, &
c) The Permissible type.
As for the prohibited type, this happens when you give others preference over yourself with regard to what is legally obligatory upon you. It is Haram to prefer anybody in this case.
In this situation, it is not permissible to give him the water to perform ablution while you perform Tayammum because you are the finder of the water & the water is under your control. In addition, it is not permissible to abstain from
“And [also for] those who were settled in al-Madeenah & [adopted] the faith before them.
[Surah Al Hashr: 9].
Meaning he will divorce her for the emigrant to marry her after the expiration of her waiting period.
This was due to the high degree of their altruism towards their emigrant brothers (may Allah be pleased with them).
"So imitate them even if you cannot be as good as them. For certainly, imitating an Honorable character is on its own an honor".