In Exercise 9.C of *van Rooij - Schikhoff: A Second Course on Real Functions* the following example is given.

Take any function $f \colon \mathbb R\to\mathbb R$ such that $f[I]=\mathbb R$ for every non-degenerate interval.

(There are many examples of such functions, see here or here.) Several such examples are also given in the book I've mentioned.

Define
$$g(x):=
\begin{cases}
f(x) & \text{if }f(x)\ne x, \\
x+1 & \text{if }f(x)=x.
\end{cases}
$$
Prove that $g$ is Darboux continuous.

This example is given there as an example of a function, which is Darboux continuous but does not have connected graph. But this function also has the property that $f(x)\ne x$ for every $x\in\mathbb R$.

But the authors of this book did not explicitly stated where this example is taken from.

I'll add my solution of this part of the exercise.

*$g(x)$ is strongly Darboux.* Let $I=(a,b)$ and $I_1=(a,(2a+b)/3)$, $I_2=((2a+b)/3,(a+2b)/3)$, $I_3=((a+2b)/3,b)$ be a division
of $I$ into three parts. We know that $f[I_1]=\mathbb R$, which implies $g[I_1]\supseteq \mathbb R\setminus I_1$.
(If $x\in I_1$ and $f(x)\notin I_1$ then necessarily $f(x)=g(x)$.)

By the same argument $f[I_3]\supseteq \mathbb R\setminus I_3$. Hence $f[I] \supseteq f[I_1]\cup f[I_3] \supseteq (\mathbb R\setminus I_1)\cup(\mathbb R\setminus I_3)=\mathbb R$.

A rather similar example is given in
*Andrew Michael Bruckner and Jack Gary Ceder, Darboux continuity,* Jahresbericht der Deutschen Mathematiker-Vereinigung 67 (1965), 93-117, eudml; as Example 4.1. (In this case, the function is defined on $(0,1)$.)

The references given there are Knaster, B. and Kuratowski, K.: Sur quelues propriétés topologiques des fonctions dérivées, Rend. Circ. Mat. Palermo. 49 (1925), 382-386; and Kuratowski's Topologie II (Warszawa 1952), p.82.