I believe the correct expression should be I'm sorry stepping on you.
Is it correct to say I'm sorry to step on you.?
I've heard of "I'm sorry to inform you ..." "I'm sorry to tell you..." "I regret quitting my job."...
So, does "I'm sorry to step on you" mean "I'm sorry, for I'll step on you"?
Attention: I’m not a teacher.
In such a situation I usually say:
Sorry if I trod on your foot. or
"I'm so sorry! I trod on your feet. I didn't mean to crash into you, honest. You've no idea how funny you look, moving your feet about in the air," ... And it knewed I didn't mean to trod on it!