Here is an example of a function $f:[0,1]\to\mathbb{R}$
which is not monotone on any measurable set with positive measure.

Let $V\subset [0,1]$ be the usual Vitali set, selecting one
element from each equivalence class under translation by
the rationals. Thus, $V$ is not measurable, and the
translates $V+q$ (working modulo 1) for rational $q$ are
disjoint and cover $[0,1]$. It follows that none of the
translates $V+q$ contains a measurable set of positive measure. Enumerate
the rationals $\mathbb{Q}=\{ q_n \mid n\in\mathbb{N}\}$,
and let $f(x)=n$ for $x\in V+q$. Thus, $f$ is constant on
each $V+q$, and the range of $f$ involves only natural
number values. Suppose that $f$ is monotone on a measurable
set $A\subset [0,1]$. If $f|A$ is constant or has only
finitely many values, then $A$ will be contained in the
union of finitely many $V+q$, and hence not have positive
measure. Otherwise, $A$ must contain points from infinitely
many $V+q$, and since the range is contained in
$\mathbb{N}$, it must be that $f$ is nondecreasing on $A$.
For any $a\in A$, note that if $f(a)=n$, then $A\cap [0,a]$
is contained in the union of $V+q_m$ for $m\leq n$, a
finite number of translations of $V$. Thus $A\cap [0,a]$
has measure $0$ for any $a\in A$, and it follows that $A$
has measure $0$ altogether.