A 51% attack, needs to be maintained indefinetly to allow for theft of bitcoin.
Your private self hosted node will only follow the chain of valid blocks.
What is more likely, is not a 51% attack, but that that majority of the mining pools agree to censor a certain set of transactions or addresses, making moving 'frozen' funds much more difficult.
There is no rule about what transaction can be excluded or blacklisted from a block, only about which ones are valid.