There are 3 things that a child truly has control over: sleeping, eating and toileting These issues can be very emotional for parents. They can lead to power struggles with children.
This issue of pooping in the "pull up" is actually quite common. Many children are so used to pooping in a particular position (hiding in a corner squatting) that it feels unnatural to sit on a toilet. Some children are afraid of the sound, look or concept of toilets.
When we had a similar issue when my son was 3 1/2 --I refused to be pulled into a power struggle. In a very matter-of-fact way I gave my son a choice- he could poop in the potty- or he could poop in a pull-up and then clean himself up (I supervised but he had ultimate responsibility of clean up operations.)
After a while got tired of the clean up as it could be quite messy and time consuming. He finally made the choice to try the toilet and after a few uncomfortable attempts- was on track with the potty.
We kept the tone friendly and nonthreatening. I did a lot of deep breathing as it was not fun to go through this. However, I am pleased to say, that we made it through and we are onto other issues (the normal path of childhood). All the normal annoying things that kids do and parents shake their heads about.