To smell a rat means to suspect that somebody in the group has betrayed all the group members. A rat has a distinctively horrid smell that is instantly perceptible when there is a rat nearby. It is different from the idiom to smell something fishy.
1. When the rival company launched an exactly same product a few days before his own launch, Mr. Kochhar smelt a rat.
2. When the soccer team conceded a last-minute goal to their opponents despite being in the lead till that point, the coach smelt a rat.
3. The principal smelt a rat when the school Trustees called for a meeting to vote for her ouster.