Let $M=SU_3$, the compact semisimple Lie group. Write the left invariant Maurer--Cartan form $g^{-1}dg$ as $(\omega_{\mu\bar\nu})$ for $\mu,\nu=1,2,3$. The coframing $\omega_{1\bar{1}}+i\omega_{2\bar{2}},\omega_{1\bar{2}},\omega_{1\bar{3}},\omega_{2\bar{3}}$ is complex linear for a unique left invariant complex structure. Take a function $f(g)=1+e^{-|g_{1\bar{2}}|^2/\varepsilon}$. This is so close to $1$, for small enough $\varepsilon$, that the coframing $\omega_{1\bar{1}}+if\omega_{2\bar{2}},\omega_{1\bar{2}},\omega_{1\bar{3}},\omega_{2\bar{3}}$ continues to have linearly independent real and imaginary parts, so is still complex linear for a unique almost complex structure. But since $f$ is not holomorphic and is not constant, there is a nonzero Nijenhuis tensor. You could also take $f$ to be instead some smooth function with support in some small compact set, and then you get complex structure on some open set turning smoothly almost complex, not complex, on some other open set, so clearly not algebraic or even analytic.

To clarify, as requested: as $SU_3$ is a Lie group, its tangent bundle is trivial as a smooth real vector bundle. Consider the linear map $\Omega \colon TSU_3\to \mathbb{C}^3$ given by $\Omega(v)=(\omega_{1\bar{1}}+i\omega_{2\bar{2}},\omega_{1\bar{2}},\omega_{1\bar{3}},\omega_{2\bar{3}})$ and $\Omega_{\varepsilon} \colon TSU_3\to \mathbb{C}^3$ given by $\Omega(v)=(\omega_{1\bar{1}}+if\omega_{2\bar{2}},\omega_{1\bar{2}},\omega_{1\bar{3}},\omega_{2\bar{3}})$. Let $J_0$ be the standard almost complex structure on $\mathbb{C}^3$. Let $J(v)=\Omega^{-1}(J_0\Omega(v))$. Let $J_{\varepsilon}(v)=\Omega_{\varepsilon}^{-1}(J_0\Omega_{\varepsilon}(v))$. These are my almost complex structures: elements of $\operatorname{End}T_{SU_3}$. You can compute from the Maurer-Cartan equations that $J_0$ is a complex structure, and that $J_{\varepsilon}$ has zero Nijenhuis tensor (so arises from a complex structure) on any open set where $f=0$, but not near any point where $df\ne 0$.