I've just been watching a video from Bitcoin University, and he seems to suggest that a node can refuse to support a transaction with illegal content. One way he suggests is to use Bitcoin Knots, but he seems to imply that it would be possible for a core node to help in blocking these transactions. I can see that a node could remove a transaction from the mempool he receives, and not relay it in the modified pool. However, what happens if a miner builds a block containing this transaction? I don't see how he can avoid including this in his stored blockchain.
Bitcoin node can refuse Bitcoin transactions but it is more likely if that node is from government and they want to censor Bitcoin transactions by their criteria.
Like these
fifteen OFAC-sanctioned transactions missing from blocks.and
Six OFAC-sanctioned transactions missing.Luckily so far there is no mass successful censorship from Bitcoin nodes and mining pools to seriously censor Bitcoin transactions under government request or regulations.