Do we take rebirth if we help others?
Let's apply superposition theory. Imagine that in your life only this Karma will decide, whether you will take rebirth or not.
If someone is starving for the food and then,
- You offer food thinking that "I did good job of fulfilling hunger.", then you may take rebirth to 'enjoy' the result of such good deed.
- You don't offer food & are aware that "I didn't help him, even if I could.", then you may take rebirth to 'enjoy' the result of that bad deed.
Let's assume that, above are the only 2 possibilities. Apparently the 1st seems Dharma and 2nd one seems Adharma.
BTW, we cannot say if it's Dharma/Adharma, just based on this much information. For example, what if you know that the starving person is a terrorist, or the person is starving with his/her own whims, or the person may throw the food due to mental instability.
How to avoid rebirth?
By observing Akarma in Karma!
Suppose, as a witness you are aware that,
'[Your] body with senses, helped or didn't help another [poor's] body with senses.'
In such case, you haven't related yourself with your own mind + senses. But gone beyond mind + senses.
In such case you may not have rebirth. As discussed in this answer, a new body attracts, mind + senses to return. But you are neither of them, hence no return!
This is also called NishkarmatA.
BG 3.27 — All actions (karma-s) are enacted in Prakruti by  modes. Bewildered with ego, Self (Atma) believes "I am the doer".
BG 5.8, 5.9 — "I certainly don't do anything" is believed by knower of fundamentals; Even while seeing, hearing, touching, smelling, eating, moving, dreaming, breathing, talking, discarding, accepting, opening, closing -- "Senses only are acting in the subjects of senses" - is understood.
But aren't there so many previous (sanchita) Karma-s, which we have to pass through?
No, that is the power of knowledge or realisation. The moment one fully realises: "I am not the actor", it becomes free from the bondage, whether it's living (jeevan mukta) or dead (nirvAna).
BG 4.36-37 — Even if you be the worst sinner among all sinners, still you will cross over all the wickedness with the raft of Knowledge alone. O Arjuna, as a blazing fire reduces pieces of wood to ashes, similarly the fire of Knowledge reduces all Karma-s (actions) to ashes.
Note: “The question: Do we take rebirth if we help others?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.