For noisy random test dataset $(\mathbb{x}, y)$, the similarity-based non-optimal nearest neighbor classifier $g_N$ will have out-of-sample misclassification error probability as expressed by $P[g_N(\mathbb{x}) \neq y]$, and obviously if its nearest neighbor in the training data is erroneously labeled then error probability is pretty high for KNN (=1 for 1NN) classifier, thus nearest neighbor classifier makes a mistake if there's an error on the test point or on its nearest neighbor.
On the other hand, since your assumed optimal (Bayes) classifier $f$ for binary classification where output, say $1$ and $-1$, is modelled noisy via a unique conditional probability distribution $\pi(\mathbb{x})$, for the same noisy random test dataset $(\mathbb{x}, y)$ its out-of-sample misclassification error probability is expressed by $P[f(\mathbb{x}) \neq y]=\text{min}(\pi(\mathbb{x}), 1−\pi(\mathbb{x}))$. Note the erroneously labeled training data outlier(s) would not have much effect on the assumed optimal conditional distribution $\pi(\mathbb{x})$ as long as the whole training data is enough and representative for its population