Islam teaches its ummah to be grateful to the good deeds, help, or kindness bestowed to them. E.g. if someone helped you monetarily or by providing food, clothes and polite advises. The gratefulness shall be in compliance and non-gratefulness is non-compliance to Islamic values, provided that you are in return not requested to be part of any evil doing. If in the event, you need to in return collaborate for evil doing, you must refuse. This you cannot called as ungrateful. There is a misunderstandings among some Muslims in general and Indian Muslims in particular that Malay community are not grateful to their masters after being accorded the help, or kindness or on the basis ‘Melayu Mudah lupa’ the kindness or help already extended to them. Nevertheless, any help and kindness from one must not be forgotten and shall be in return being grateful to, but for evil doing this shall not be extended, otherwise it defeat the purpose and meaning of ‘grateful’. Meanwhile being thankful is to remember the good deeds one has extended to us, if the person abuse this, or tried to abuse this as means to obtained undivided obligation to fulfill whatever requested by the provider even if its wrong, than the receiver by all means have the right to refuse obligation to fulfill the request. In fact it is the religious duty and obligation for the receiver to be witness to wrongdoing of the provider to ensure truth and justice are served.
In a nutshell, truth and justice supersedes the obligation to be grateful to someone, when you are in the position to upheld the truth and justice which is what a true Muslim shall perform, even if its against own family members, as our beloved prophet pbuh has said once, that even if his daughter Fatimah r.a. is caught steeling, he will met out the punishment as per the Qur’an’s hudud law against her. So Islam takes the side of truth and justice over obedience and gratefulness for worldly helps done.