Delegated funds can be undelegated. While the stacking is already in progress (the locked amount exists) and even if undelegation has been done, the balance in the wallet equaling to the amount of delegated funds cannot be used during the locked period. Similarly, even if the undelegation has been done, the rewards will be paid out in the manner specified by the each pool operator after that period (cycle) ends.