If this block exists in the best chain (or a chain of given chain_tip), then we know that this transaction is confirmed in the best chain.
Blocks in bdk_chain are identified by BlockId which is block_height+block_hash. So we anchor transactions to BlockIds and we just need to know whether this BlockId is in the best chain.
Sometimes we know the confirmation height of a transaction, but we don't know the confirmation block hash (Electrum). So we have a looser definition for Anchor, so that the anchor BlockId can be of a different height to the confirmation height of the transaction.
For Electrum (as @Steve Myers mentioned), we need to get the tip before getting tx data, and ensure the tip still exists in the best chain after grabbing all the tx data. We use the tip as the anchor BlockId in this scenario.