Yes, and only if accepted (if you’re deferred or waitlisted and subsequently admitted, it’s not binding).
Remember to give the school enough time to process your withdrawal. If you write to them too late (just hours or a few days before the decision is released), they may not process your request in time before the decision is announced.