This answer is helpful, but it doesn't quite answer your question because your conditions are a bit stronger.
Let's try to give the trivial line bundle $M \times \mathbb{R}$ a structure that satisfies 1) through 3) but not 4). There are a bunch of rather ridiculous counterexamples that work:
For points $p$ in dense set of $M$, choose the vector space structure of $\pi^{-1}(p)$ such that $p$ is not the additive identity. For the remaining points, choose the vector space structure so that $p$ is the additive identity. This is clearly a "discontinuous" structure.
Even more ridiculous: Because $\mathbb{R}$ is in bijection with $\mathbb{R}^2$, make some fibers $1$-dimensional, and other fibers $2$-dimensional.
These counterexamples can be easily remedied with conditions weaker than local triviality, so they aren't that interesting.
A more interesting counterexample is one where the structure is continuous, but not smooth. We can picture our bundle like this:

Here, the horizontal lines show how each vector space is "graded": if you choose a vector in the first line above $M$, scaling that vector by $3$ gives you a vector in the third line above $M$. We want to choose this grading in a way that is not smooth. An initial idea might be to try:

This drawing is supposed to show the fibers getting stretched out as you move away from a fixed fiber. However, this is actually the exact same grading as the previous picture because the stretching is "linear," and thus doesn't really change the vector space structure. If we overlayed the first picture on top of the second picture, our earlier heuristic still works: if you choose a vector on the first horizontal line and scaled it by $3$, you get a vector on the third horizontal line. However, combining our ideas does work:
We can construct this precisely as follows. Let $M = \mathbb{R}$ and $E = M \times \mathbb{R}$, with the canonical smooth structure. Let $\phi : E \to M \times \mathbb{R}$ be the map
$$
\phi(x, y) = \begin{cases}
(x, y) & \text{if $y \leq 0$,} \\
(x, (1 + |x|)y) & \text{otherwise.}
\end{cases}
$$
We can use $\phi$ to assign each fiber of $E$ a vector space structure, like in our picture.
We claim that $E$ is not a vector bundle. Suppose $\psi : \pi^{-1}(U) \to U \times \mathbb{R}$ is a local trivialization. Then $\phi \circ \psi^{-1} : U \times \mathbb{R} \to U \times \mathbb{R}$ must be a homeomorphism that restricts to a linear isomorphism on each fiber. Because $\phi$ is smooth on the lower half-plane (it is the identity), the composite $\phi \circ \psi^{-1}$ must be smooth on some half-plane. The fact that $\phi \circ \psi^{-1}$ is a linear isomorphism over each fiber implies that $\phi \circ \psi^{-1}$ is in fact smooth everywhere. This is a contradiction because $\phi = (\phi \circ \psi^{-1}) \circ \psi$ is not smooth.