We know that if $M$ is a left $R$-module, then $(\{\text{submodules of }M\},\subseteq)$ is a modular lattice.
Taking $M\!=\!R$, we deduce that $(\{\text{ideals of }R\},\subseteq)$ is a modular lattice.
However, for $R=K[x,y,z]$, the ideals $\big\{0,\:\langle x\rangle,\:\langle y\rangle,\:\langle y,z\rangle,\:R\big\}$ form the lattice $N_5$, which contradicts modularity. Where did I make a mistake?