How can the policy iteration algorithm be model-free if it uses the transition probabilities?
Everything you say in your post is correct, apart from the wrong assumption that policy iteration is model-free. PI is a model-based algorithm because of the reasons you're mentioning. 

See my answer to the question What&#39;s the difference between model-free and model-based reinforcement learning?.