Is it obligatory to participate in conference if accepted?
As long as you haven't signed over any copyrights the paper is still yours. Yes, you can withdraw it. The organizers will grumble a bit, but you can ignore that. And even if you have already signed rights away you can ask to have them returned, which might happen or not.
But don't make a habit of this. The reviewers spent some effort on your paper that is now wasted.
The only other consequence is that your paper gets delayed. That could be a problem or not, depending on how many others are working in closely related areas.
To be honest, this is not the nicest thing to do to conference organizers. Assume your paper is very strong and the organizers look forward to have that in their conference and you now you pulling it out will disappoint them (apart from the reviewer time being wasted).
Now, if you have to make the choice between your supervisor and the conference organizers, your supervisor takes precedence. But in the future, you should check that ahead of time.
Generally, it is not good form to submit and then to pull out without good reason. Legally, you can do so, as long as the copyright is not signed over.