As @Batominovski's pointed out in the comments, since $f$ is Lipschitz, it is
absolutely continuous and so one can use integration by parts as the referenced
answer does.
If you prefer not to, here is another approach. Note that this approach and the
referenced approach are both based
on the fact that at an extreme point of $|F|$, we must have $f(x) = 0$.
If $x_1 < x_2$ and $f(x_1) = f(x_2) = 0$, then since $f$ is Lipschitz with rank $M$,
we have $|f(x)| \le M \min (x-x_1, x_2-x)$ for $x \in [x_1,x_2]$ (a little 'tent' function
centered on ${1 \over 2} (x_1+x_2)$).
Note that $F$ is differentiable and $F'(x) = f(x)$.
Let $x^*$ be a point at which $F^2$ (or equivalently $|f|$) attains a $\max$. Then
we have $2 F(x^*) f(x^*) = 0$, so either $F(x^*) = 0$ or $f(x^*) = 0$. If $F(x^*) = 0$,
then $F=0$ and the inequality is trivially satisfied.
So suppose $f(x^*) = 0$. Suppose that $x^* \le {1 \over 2}(a+b)$. Now note that
$|f(x)| \le M \min(x-a,x^* -x) \le M \min(x-a, {1 \over 2}(a+b) -x)$ and
$|F(x)| \le \int_a^{{1 \over 2}(a+b)} |f(t)| dt \le M \int_a^{{1 \over 2}(a+b)} \min(t-a, {1 \over 2}(a+b) -t) dt = M {(b-a)^2 \over 16}$.
If $x^* > {1 \over 2}(a+b)$ we can apply a similar analysis, or we can note that
$g(x) = f(b+a-x)$ satisfies the same conditions and $G^2$ attains a $\max$ at some
point $x^{**} \le {1 \over 2}(a+b)$.
In any event we have $|F(x)| \le M {(b-a)^2 \over 16}$.