Case 1: Within one’s responsibility. A teacher who discovers cheating can address it according to school policy and guide the student to honest conduct.
Case 2: Another person’s wrongdoing. A student may offer respectful advice but cannot invent authority to punish or use force.
Case 3: Danger or inability. Avoid needless confrontation, disapprove inwardly, seek safe and appropriate means, and, when warranted, inform those with proper responsibility.
بِقَلْبِهِ means inwardly rejecting wrongdoing, not accepting it as right. فَإِنْ لَمْ يَسْتَطِعْ is a real qualification of ability, not a blanket excuse for indifference.