Note: I originally posted this as an answer to another question before realizing that it was a duplicate, so I'm reposting it here.
As already noted, any scheme that lets $B$ choose $c_B = c_A$ will allow $B$ to cheat by doing so. More generally, so will any scheme that lets $B$, given $c_A$, choose a valid ciphertext $c_B = f(c_A)$ such that $c_B$ still encrypts the same (or the opposite) bit as $c_A$.
Even more generally, $B$ will have an unfair advantage if (and only if!) there exists any function $f$ such that, given $c_A$ and $c_B = f(c_A)$, $B$ can predict $b_A \oplus b_B$ with better than 50% chance. In fact, this is effectively just a restatement of the problem: $B$ can cheat if and only if they can, given $c_A$, choose $c_B$ so as to have an advantage in predicting $b_A \oplus b_B$.
So, what does it take to prevent this? I will argue below that any IND-CCA2 secure encryption scheme will, by definition, suffice to prevent $B$ from cheating (by showing that, if $B$ could cheat, they could also break the IND-CCA2 security), provided that $B$ is prevented from choosing $c_B = c_A$. (Since the ciphertexts are public, this additional restriction can be easily enforced; without it, the problem has no solution, as $B$ can always cheat.)
Proof: Assume that, given a ciphertext $c_A$ encoding a random bit $b_A \in \{0,1\}$, $B$ can choose a valid ciphertext $c_B \ne c_A$, also encoding a single bit, such that they have a non-negligible advantage in guessing whether $c_B$ encodes the same bit as $c_A$. Then $B$ can also break the IND-CCA2 resistance of the encryption scheme as follows:
- Submit $M_0 = 0$ and $M_1 = 1$ to the challenger as the two challenge plaintexts.
- Treat the received challenge ciphertext as $c_A$, and compute the corresponding $c_B$.
- Submit $c_B$ to the decryption oracle to learn which bit it encodes; this is allowed under the rules of the CCA2 game, since $c_B \ne c_A$.
- Since $B$ now knows which bit $c_B$ encodes, and (by assumption) has a non-negligible advantage in guessing the XOR of this bit and the challenge bit, they have the same advantage in guessing the challenge bit. $\square$