(What follows is not quite finished, because the computations didn't go as simply as I had thught they would. Still, it seems better to post than to delete.)
I will assume that $f$ is differentiable, and leave it to others to determine is this assumption is important.
If the dimension of $V$ is $1$, the the claim is obviously false, as mentioned by Amitesh Datta. I will give an elementary proof for the dimension equal to $2$. For larger dimensions, just note that $f$ has to map planes to planes, so the considerations for $\operatorname{dim} V = 2$ still apply, so $f$ restricted to any plane is affine. But a function affine on any plane is affine per se, so the claim in higher dimension follows.
So, let us assume that $\operatorname{dim} V = 2$, so that we are talking about a plane. Let $A,B,C$ be any points on the plane, and let $A' = f(A)$, $B' = f(B)$, $C' = f(C)$. For $\alpha \in [0,\infty]$, let $K(\alpha)$ denote the point on $BC$ with $|BK(\alpha)|:|K(\alpha)C| = \alpha$. Likewise, we denote by $L(\beta), M(\gamma)$ analogously defined points on $CA$ and $AB$ respectively. Because of the condition about the lines being preserved, $f$ maps $K(\alpha)$ to a point $K'(\alpha')$ with $K'$ defined analogously, and $\alpha' = t(\alpha)$ for some function $t:\ [0,\infty] \to [0,\infty]$. Likewise, let $r,s$ be functions such that $f(L(\beta)) = L'(r(\beta))$ and $f(M(\gamma)) = M'(s(\gamma))$.
The key geometric insight which I will use is the Menelaus Theorem, which asserts that the lines $AK(\alpha), BL(\beta), CL(\gamma)$ intersect in a single point iff $\alpha\beta\gamma =1$. Thus, if $\alpha\beta\gamma =1$, then we also have $t(\alpha) r(\beta) s(\gamma) = 1$. Put $\gamma = 1/\alpha\beta$ so that $\alpha,\beta$ are independent. Differentiating this equality, we get for any $\alpha,\beta$:
$$t'(\alpha) s(\frac{1}{\alpha\beta}) + \frac{-1}{\alpha^2 \beta}t(\alpha)s'(\frac{1}{\alpha\beta}) = 0.$$
Letting $\beta := \frac{1}{\alpha \gamma}$ for arbitrary $\gamma$, we get:
$$ \alpha \frac{t'(\alpha)}{t(\alpha)} = \gamma \frac{s'(\gamma)}{s(\gamma)}. $$
Because each side depends only on a single variable, they have to be constant:
$$ \alpha \frac{t'(\alpha)}{t(\alpha)} = c, \quad c \text{ - constant}.$$
This is easily solved:
$$ (\ln t)'(\alpha) = \frac{c}{\alpha} $$
$$ (\ln t)'(\alpha) = (c \ln )'(\alpha)$$
$$ (\ln t)(\alpha) = c \ln(\alpha) + d $$
$$ t(\alpha) = \alpha^c e^d $$
Note that $c$ is universal: the same for $t,s,r$, while $d$ depends on the line we are looking at (so, $d = d_{BC}$, say).
Now, it didn't go nearly as smoothly as I had thought at first. There is a way to finish this off, but that requires a little bit more computation. Here is what to do: Pick another point, say $C_2$, at $BC$. For the triangle $ABC_2$, one can redo the above reasoning. This gives two formulas for how points on $BC_2$ transform onto point on $B'C_2'$. One is, roughly speaking $ t(\alpha) = \alpha^c e^d $, the other is (even more roughly) $ t_2(\alpha_2) = \alpha_2^c e^{d_2} $. These two are incompatible, unless $c= 1 d = 0$, I believe.