A function with no inflection point
Suppose that there is an inflection point $p$ of $f$. Then there is a neighborhood $(a, b) $ of $p$ such that $f''$ changes sign in interval $[a, b] $ exactly at point $p$. Now consider the line which passes through $(p, f(p)) $ and has slope $m\neq f'(p) $. We choose $m>f'(p) $ if $f''$ is positive to the right of $p$ otherwise we choose $m<f'(p) $. The equation of the desired line is $$y=f(p) +m(x-p) \tag{1}$$ and the points of intersection with curve $y=f(x) $ (apart from $(p, f(p)) $) are given by solutions to $$f(x) = f(p) +m(x-p)\tag{2}$$ For values of $m$ near $f'(p) $ this will have two solutions $s, t$ such that $s<p<t$ and hence the line will intersect $y=f(x) $ in two points $(s, f(s)) $ and $(t, f(t)) $ such that $a\leq s<p<t\leq b$. Now the equation $$f'(x) =\frac{f(s) - f(t)} {s-t}$$ has two roots one in $(s, p)$ and another in $(p, t) $ because of the equation $$\frac{f(s) - f(t)} {s-t} =\frac{f(s) - f(p)} {s - p} =\frac{f(p) - f(t)} {p-t}$$ Thus we get the desired contradiction.
The equation $(2)$ is more easily solved by expressing it as $$m=\frac{f(x)-f(p)}{x-p}\tag{3}$$ And consider the case when $m>f'(p) $ ie when $f''(x) $ is positive in $(p, b] $ and consider the function $g$ defined by $$g(x) =\frac{f(x) - f(p)} {x-p}, g(p) =f'(p)$$ so that $g$ is continuous in $[a, b] $ and $g(x) >g(p) $ for all $x\in[a, b], x\neq p$ (because $f''$ is positive in $(p, b) $ and negative in $(a, p) $). Let $M, M'$ be the maximum values of $g$ in intervals $[a, p] $ and $[p, b] $ respectively. Then both $M, M'$ are greater than $g(p) =f'(p) $. If we choose $m$ such that $$f'(p) =g(p) <m<\min(M, M') $$ then via intermediate value theorem for continuous $g$ we can ensure that equation $(3)$ has a root in $(a, p) $ and a root in $(p, b) $.
Put $a=1$ and $b=3$ then the condition does not hold for your function as there are two points inside the interval (1,3) where the derivative is $0$.