Yes - the bill text contains a provision for a state to withdraw from the agreement. Under Article IV - Other Provisions:
Any member state may withdraw from this agreement, except that a
withdrawal occurring six months or less before the end of a
President’s term shall not become effective until a President or Vice
President shall have been qualified to serve the next term.
It also sets out the notification obligation placed on the chief executive of the state under this circumstance:
The chief executive of each member state shall promptly notify the
chief executive of all other states of when this agreement has been
enacted and has taken effect in that official’s state, when the state
has withdrawn from this agreement, and when this agreement takes
effect generally.
With regard to what happens if a majority of electoral votes are reached, the agreement takes effect, and then a state withdraws, leaving the signatories without a majority of electoral votes, this is handled at the end of Article III. Although the bill text states that
This agreement shall take effect when states cumulatively possessing a
majority of the electoral votes have enacted this agreement in
substantially the same form and the enactments by such states have
taken effect in each state,
which seems to leave open the question as to what happens if the agreement takes effect, but a majority of electoral votes is lost, the last provision of Article III states:
This article shall govern the appointment of presidential electors in
each member state in any year in which this agreement is, on July 20,
in effect in states cumulatively possessing a majority of the
electoral votes.
This provision, combined with the fact that a withdrawal from the agreement in the period six months prior to the end of a President's term is blocked from taking effect until after the election of the new President, ensures that the agreement will only be used to appoint electors when the signatories control a majority of electoral votes.