I think your confusion stems from misunderstand of Proof-of-Work and 51% attacks. Bitcoin's Proof-of-Work mechanism dictates that the chain with the most "work" is the valid chain. For practical purposes, this means the chain with the most blocks (the longest) is the most valid.
When a node receives a new block from a peer, it can independently determine whether this block is a valid block to attach to the tip of the chain. If one honest node serves valid blocks to a node, no number of other nodes can convince that node that the valid block is invalid. If a node has 7 malicious peers and 1 good peer, the 7 malicious peers cannot disguise the fact that the block served by the good peer is part of a longer chain than the "fake" blocks served by the malicious peers.
This is because a 51% attack involves controlling 51% of the hash rate, not 51% of nodes connected to a specific node, or even 51% of all nodes on the network. As long as 51% of hash rate (mining compute power), is honest, it will continuously produce a longer chain of blocks than any malicious actors, allowing good nodes to serve honest blocks to one another, which they can independently verify are part of the longest chain.
If a node is completely surrounded by malicious nodes (100% of its peers are malicious), they can perform a DoS attack on a node by refusing to send new blocks to the victim node. In this case, the victim will never see new blocks, and malicious nodes can serve invalid blocks which are not part of the longest chain, because the victim cannot compare all chains to determine which is the longest.