"Sure" is simply an expression of acceptance. Colloquially, it's used quite a lot and less often in formal situations.
Normally, you would expect the answer to be "no" in response to the question "do you mind," because "to mind something," means "to worry about" or "to be annoyed with." So I understand your confusion in this case.
Despite the meaning of "to mind," colloquially you will hear the word "sure" from time to time. If you are uncertain of the speaker's intentions through their words alone, pay attention to their tone of voice and facial expression to confirm what you think they mean. If, for some reason, you are still unsure, then ask directly to confirm.
I hope this helped. Let me know if you have any more questions.