The attorney-client privilege can be explicitly waived by the client, but not by the attorney. It is only with the client’s consent that a confidential communication can be disclosed (aside from other exceptions).
If you do consent to confidential communications being disclosed, you cannot “close Pandora’s Box” by taking back your waiver. It’s important to note, however, that your waiver would likely not be absolute — most waivers are narrowly-construed to limit how much information is actually revealed. Defendants may attempt to take advantage by trying to reach for more than the waiver allows, so one must be careful to craft their waiver to prevent overreach.