There can only be one block at every height in a particular blockchain. If a block includes an already confirmed transction, the transaction is considered invalid. Invalid nodes are rejected by nodes in a network. Therefore, the same transaction cannot be confirmed twice ina single branch. However , if there are two blocks at the same height confirming the same transaction, that is fine as they'd be already competing to be in the longest chain anyway. The other would become stale.