The OCC describes
the right of offset and when a bank is allowed to offset your deposit account as follows:
Generally, a bank may take money from your deposit account to make a payment on a separate debt that you owe to the bank, such as a car loan, if you are not paying that loan on time. This is called the right of offset.
However, federal law limits what a bank can do in some cases. For example, federal law won’t allow a bank to offset your deposit account to pay off your consumer credit card account.
As Dr Don at Bankrate
describes, there other complexities that could allow an institution to offset your CD or other deposit account if you were to default on your credit card account.