Here is a nested interval proof, assuming continuity of $f$ everywhere:
Suppose $f(a) < f(b)$. Let $a_0$ be the largest number in $[a,b]$ with $f(a_0) = f(a)$, and let $b_0$ be the smallest number in $[a_0, b]$ with $f(b_0) = f(b)$. Then for $x \in [a_0, b_0]$ we have $f(a_0) < f(x) < f(b_0)$. Now $f$ is uniformly continuous on $[a_0, b_0]$. At stage $i$ for $i \geq 1$, find $\delta$ such that if $|x - y| < \delta$, then $|f(x) - f(y)| < (f(b_{i-1}) - f(a_{i-1}) / 2$.
Further require that $\delta \leq 1/i$ and that $(b_{i-1} - a_{i-1}) / \delta$ be an integer $> 2$. Break up $[a_{i-1}, b_{i-1}]$ into $n$ segments of equal length $\delta$. Call the left endpoints of these $c_{ij}$, where $0 \leq j \leq n-1. c_{in} = b_{i-1}$. Suppose $f(c_{ij}) \geq f(c_{i(j+1)})$ for $1 \leq j \leq n-2$. Then $$f(b_{i-1}) - f(a_{i-1}) = \sum_0^{n-1} (f(c_{i(j+1)}) - f(c_{ij})) < (f(b_{i-1}) - f(a_{i-1})) / 2 + \sum_1^{n-2} (f(c_{i(j+1)}) - f(c_{ij})) + (f(b_{i-1}) - f(a_{i-1})) / 2 \leq f(b_{i-1}) - f(a_{i-1}),$$ which is a contradiction. Therefore, $f(c_{ij}) < f(c_{i(j+1)})$ for some $j$ between $1$ and $n-2$. Thus, we can find $d_i$ and $e_i$ with $a_{i-1} < d_i < e_i < b_{i-1}$, $f(d_i) < f(e_i)$, and $e_i - d_i = \delta \leq 1/i$. Let $a_i$ be the largest number in $[d_i, e_i]$ with $f(a_i) = f(d_i)$, and let $b_i$ be the smallest number in $[a_i, e_i$] with $f(b_i) = f(e_i)$. Then for $x \in [a_i, b_i]$ we have $f(a_i) < f(x) < f(b_i)$. Also note that $a_{i-1} < a_i < b_i < b_{i-1}$ and $b_i - a_i \leq 1/i$. By the Nested Interval Theorem, $S := \bigcap^{\infty}_{i=0} [a_i,b_i] \neq \emptyset$. Since the lengths are going to $0, S = \{p\}$, where $p = \sup \{a_i\} = \inf \{b_i\}$. If $N$ is an open set $\ni p$, we can find $n$ such that $p \in (a_n, b_n) \subset N$. Then $f(a_n) < f(p) < f(b_n)$, so $p$ is neither a local minimum nor a local maximum.