For ease of reference, call each integer lattice point a house. Without loss of generality, let the lattice in the question be the set of all points with integer coordinates on an $XY$ plane.
Given a house $H$, let its colour be given by a function $C(H)$. We call $C$ a colouring.
We call a vector a house vector if the vector is parallel to a line that contains at least two houses.
The first constraint requires every straight line passing through at least 2 houses to be periodic. That is, given a house $H$ and a house vector $v$ whose magnitude is the period associated with the line containing $H$ and parallel to $v$, then for any integer $k$, $H + kv$ is also a house and has the same colour as $H$.
$$\forall k \in Z: C(H) = C(H + kv) \tag{1} \label{1}$$
The second constraint in the question requires $C$ to be non-periodic. This implies the existence of a non-empty set $F$ of houses such that there is no house vector $u$ for which $C$ remains invariant when translated any non-zero distance in the direction of $u$. The following shows by contradiction that $F$ does not exist.
Suppose we had a colouring $C$ that contained such a set $F$.
Select any house vector $v$.
For each house $F_i$ in $F$, let $p_i$ be the period of the line passing through $F_i$ and parallel to $v$.
Let $p$ be the LCM of all the $p_i$ and let $u$ be the vector parallel to $v$ and with magnitude $p$. By equation $\eqref{1}$, since $p$ is a multiple of each $p_i$, the colour of each $F_i$ repeats periodically in the direction of $u$.
$$\forall k \in Z: C(F_i) = C(F_i + ku) \tag{2} \label{2}$$
This means that the colour pattern of the whole set $F$ is periodic with period $p$ in the direction of $u$, contradicting the second condition. Therefore $F$ doesn't exist.
So the houses cannot be painted as proposed.