In this episode, an away team from the Enterprise (standard team with Kirk, Spock and McCoy) encounter a small community of humanoid aliens who all have psychokinetic abilities, except for a dwarf that the others bully. McCoy thinks he can find a way to give the dwarf the same powers as the others, but the dwarf refuses because he doesn't want to become "like them".
This is Star Trek: The Original Series S03E12, "Plato's Stepchildren" (1968).
The Enterprise finds a planet inhabited by aliens who were once followers of the Greek philosopher Plato.
The 'dwarf' character is Alexander.
Alexander was a resident of Platonius who, unlike the other Platonians, did not have the power of psychokinesis. He was a person of extraordinarily short stature who served as court buffoon and slave to the other Platonians.
Enterprise chief medical officer Leonard McCoy later determined that the others got their power from the food native to Platonius which contained kironide, a substance that after being assimilated by the pituitary gland promoted psychokinesis. Unfortunately, since dwarfism stemmed from a malfunction in that gland that also regulated body growth, Alexander did not have the psionic ability.
Alexander agreed to help the Enterprise crew escape. McCoy synthesized the kironide and injected himself, Kirk, and Spock. They offered Alexander an injection, but he refused to get a dose out of disgust for his fellow Platonians' laziness and cruelty.