Before a node submits transactions to another node, you could require it to send you a list of transactions which were signed by a "node key". If there is a transaction this node did not include but had been seen before when communicating with another node,* and is also not in your own transaction list, then you don't transmit your transactions.
This all sounds very computational expensive, for every node not just to be verifying a broadcasting transactions, but also verifying each transaction was signed by each node's key. I'm also don't know how you could actually verify that node had indeed previously seen a transaction it was not broadcasting. Each node would have to store and share a list of every transaction it was broadcasting to every node, but even then, there would be no way to verify that a node actually received what was being broadcast to it.
I also don't think it's particularly necessary. One or two nodes participating in censorship is irrelevant - transactions will spread around them without issue. Even if we pick some ridiculous number like 50% of nodes which start censoring transactions, then given that by default each node connects to 8 others, there is only a 0.4% chance that all 8 of the nodes you connect to would be censoring.
Given how easy it is to run a node, I don't think this will ever be a problem. There are plenty of people who run nodes who would never implement censorship, and there are plenty of people like me who would quite happily spin up 10 nodes to counteract such censorship.