The "lui" represents the snowman, not the ball of snow:
Martine roulait une grosse boule pour lui faire une tête.
I agree that the text in isolation is ambiguous, but this has been clarified by a hint under the text:
Martine was rolling a big ball to make it a head.
HINT: "it" = le bonhomme de neige
[In English I think we would say "Martine was rolling a big ball to make him a head".]