Both are fictional: Rancors (Star Wars—giant clawed beasts) and Oompa Loompas (Charlie and the Chocolate Factory—tiny factory workers).
They exist in separate universes with no shared physics, biology, or narrative rules. Any "who would win" answer is pure imagination—there's no factual basis.
Fun to debate, impossible to resolve.