This is an old problem and the statement in the OP is known as Darboux theorem. There is a nice proof here
Here is an example of a function $f$ on $[-1,1]$ that is differentiable in $[-1,1]$ and such that neither $\lim_{x\rightarrow0-}f'(x)$ nor $\lim_{x\rightarrow0+}f'(x)$ exits.
Define in $[-1,1]$ the function
$$f(x)=\left\{\begin{array}{lcr}|x|^{1+c}\sin(|x|^{-c}) & \text{if} & x\neq0\\
0 &\text{if} & x=0\end{array}\right.
$$
where $c>0$.
It is clear that $f$ is differentiable in $[-1,0)\cup(0,1]$. To show that $f$ is differentiable also at $x=0$ notice that
$$\lim_{x\rightarrow0}\frac{f(x)-f(0)}{x-0}=\lim_{x\rightarrow0}\operatorname{sing}(x)|x|^c\sin(|x|^{-c})=0$$
since $|\sin|\leq 1$ and $c>0$.
We only consider $x>0$ as the $x<0$ can be obtained by symmetry.
\begin{align}
f'(x)&=(1+c)x^c\sin(x^{-c}) -c\cos(x^{-c})
\end{align}
The first term on the right hand side converges to $0$ as $x\rightarrow0+$, however, the second term does no have a limit.