Consider the initial value problem $$y'(x)=f(x,y(x)), \\ y(x_0)=y_0,$$ where the function $f \colon D \to \mathbb R$ is defined and continuous on some open set $D \subseteq \mathbb R \times \mathbb R$ and $(x_0, y_0) \in D$. Is the following statement true?
This problem cannot have two distinct solutions on some interval $[x_0, x_1]$ if $$\forall (x,y) \in D \colon f(x, y) \ne 0.$$
If $f$ does not depend on $x$, the answer seems to be positive, i.e. we have some kind of uniqueness theorem here, but my intuition tells me that it is, generally, wrong. Can you provide a counterexample?