Yes, it can be. For example, it can be competitive: One student in a class enjoys laying it on thick, and maybe he means it. At the same time, his "mentor" has been advising him, and his mentor probably was the one who told him that showing appreciation was a good quality that would show him to be an enthusiastic follower as well as leader. He might really be "feeling" it, but it's clear that he aspires to a position of "teacher's pet" and wants to be given leadership responsibilities over the other students. No matter how sincerely he appreciates the opportunities or the teacher, he's being manipulative.
It's better to use caution when expressing appreciation in a situation with a power dynamic, just as one would use caution in regard to dating in that situation. IMO, appreciation should be expressed frankly and succinctly in situations like that. No or limited gushing, applauding, and other attention-drawing BS.