Let me give an example in the Euclidean plane.
The function $f\colon\mathbb R^2\to\mathbb R$ given by $f(x,y)=x^3$ maps lines to lines.
A vertical line $x=a$ is mapped to the line $a^3$ — points are lines by the OP's definition.
Any other line is of the form $\{(t,a+bt);t\in\mathbb R\}$ for some $a,b\in\mathbb R$.
The image of any such line is $\mathbb R$.
Thus $f$ maps lines to lines, and it clearly fixes the origin.
Non-linearity is evident.
This $f$ can be promoted to a function $g\colon\mathbb R^2\to\mathbb R^2$ by letting $g(x,y)=(f(x,y),0)$.
This inherits the desired properties and is a function between two-dimensional spaces.
Below is a previous, erroneous answer. I left it here as a warning example. My actual answer is above.
I can delete this if it would be more appropriate.
Let me give an example with infinite fields.
The real line $\mathbb R$ is an infinite dimensional vector space over $\mathbb Q$.
Lines — other than the origin — are translations of the rationals ($r+\mathbb Q$ for some $r$).
Take the function $g\colon\mathbb R\to\mathbb R$,
$$
g(x)
=
\begin{cases}
x, & x\in\mathbb Q\\
0, & x\notin\mathbb Q.
\end{cases}
$$
The image of the line $r+\mathbb Q$ is the line $\mathbb Q$ if $r\in\mathbb Q$ and $\{0\}$ if $r\notin\mathbb Q$.
Therefore $g$ preserves lines and fixes the origin.
But it is not linear: $5=g(5)\neq g(5-\pi)+g(\pi)=0$.
This is not a valid example because I had misidentified lines.
For example, $2+\pi\mathbb Q$ is a line but its image $\{0,2\}$ is not.
A weaker statement is true: the image of every line is either a line or a set containing the origin and a non-zero rational number.