Q. If a man provides food to another who's starving, only to help that person, then, will it be considered dharma? And because it's dharma will he take rebirth just because of that (good) action?
Yes it will be Dharma and rebirth does't depends only on it.
If you want to know different paths to Moksha, then visit How many distinct independent paths are there to achieve Moksha?.
Also How can one know which path among karma, bhakti and jnana is suitable for him? can be useful.
If one do such Karma thinking that it will give him higher benefit, it will not lead to Moksha.
From Mundaka Upanishad (1.2):
इष्टापूर्तं मन्यमाना वरिष्ठं नान्यच्छ्रेयो वेदयन्ते प्रमूढाः ।
नाकस्य पृष्ठे ते सुकृतेऽनुभूत्वेमं लोकं हीनतरं वा विशन्ति ॥ १०॥
Ignorant fools, regarding sacrifices and humanitarian works as the highest, do not know any higher good. Having enjoyed their reward on the heights of heaven, gained by good works, they enter again this world or a lower one.
From Chhandogya Upanishd (5.10):
अथ य इमे ग्राम इष्टापूर्ते दत्तमित्युपासते ते धूममभिसंभवन्ति धूमाद्रात्रिꣳ रात्रेरपरपक्षमपरपक्षाद्यान्षड्दक्षिणैति मासाꣳस्तान्नैते संवत्सरमभिप्राप्नुवन्ति ॥ ५.१०.३॥
"But those who, living in the village, perform sacrifices, undertake works of public utility and give alms go to smoke, from smoke to night, from night to the dark half of the moon, from the dark half of the moon to the six months during which the sun goes to the south. But they do not reach the year.
So, helping others is considered as Datta Karma or fall under the category of Ishta, Purta and Datta Karma. Now those who do these type of Karma reaches to higher lokas but didn't attain Moksha or liberation.
All the higher Lokas except Brahma Loka, are subjected to circumgyration/reparation (birth-rebirth)
Note: Read Khanda 3 of Aadhyaya 6 of Chhandogya Upanishd to know and understand various paths followed by death.
So, performing only Ishta, Purta and Datta Karma is not enough and will not lead you to Moksha.
But if one doesn't expect the fruit of his Karma - In other words, If one do this as Nishkama Karma, then such Nishkam Karma will not bind him. And if one do all Karma Nishkama, it will lead to Moksha.
That's why it is suggested to do such karma without attachment by Krishna:
From Bhagavad Gita:
एतान्यपि तु कर्माणि सङ्गं त्यक्त्वा फलानि च । कर्तव्यानीति मे पार्थ निश्चितं मतमुत्तमम् ॥ १८-६॥
Hence these acts of sacrifice, charity and penance, and all other acts of duty too, must be performed without attachment and expectation of reward : this is My well-considered and supreme verdict, Arjuna.