While I haven't checked all of the details, I believe that a locally homogeneous example can be constructed as follows: First, let $G\subset\mathrm{SL}(3,\mathbb{C})$ be the $5$-dimensional, connected Lie subgroup whose Lie algebra is $$ {\frak{g}} = \left\{\ \begin{pmatrix}ir & z & w\\ \bar z & -ir & \bar{w}\\0&0&0\end{pmatrix}\ \ : \ r\in\mathbb{R},\ z,w\in\mathbb{C}\ \right\}, $$ let $H\subset G$ be the connected subgroup whose Lie algebra is as above with $w=0$, while $K\subset H$ is the connected Lie subgroup whose Lie algebra is as above with $z=w=0$. Then $H\simeq\mathrm{SL}(2,\mathbb{R})$ while $K\simeq S^1 = \mathrm{SO}(2)$. Now consider the (non compact) $G$-homogeneous space $M = G/K$. I claim that there is a $G$-invariant complex structure on $M$ and a $G$-invariant nonholomorphic foliation of $M$ by complex curves. To see this, consider the canonical left invariant $1$-form on $G$, written in the form $$ \gamma = g^{-1}\ dg = \begin{pmatrix}i\rho & \zeta & \omega\\ \bar\zeta & -i\rho & \bar{\omega}\\0&0&0\end{pmatrix}, $$ where $\rho$ is $\mathbb{R}$-valued and $\zeta$ and $\omega$ are $\mathbb{C}$-valued. The structure equation $d\gamma = -\gamma\wedge\gamma$ gives $$ d\begin{pmatrix}\zeta \\\omega\end{pmatrix} = -\begin{pmatrix}2i\rho&0 \\-\bar\omega& i\rho\end{pmatrix}\wedge \begin{pmatrix}\zeta \\\omega\end{pmatrix} $$ as well as $d\rho = i\ \zeta\wedge\bar\zeta$. From these equations it follows immediately that there is unique complex structure $J$ on $M=G/K$ for which the $(1,0)$-forms on $M$ pullback to $G$ to be linear combinations of $\zeta$ and $\omega$, that this complex structure is $G$-invariant, and that there is a unique foliation $\mathcal{F}$ of $M$ by $J$-holomorphic curves such that preimages in $G$ of the leaves of $\mathcal{F}$ are the leaves of the codimension $2$ foliation defined by $\omega=\bar\omega=0$. Moreover, because $\omega\wedge d\omega\not=0$, the foliation $\mathcal{F}$ is not holomorphic. Now, as I wrote, $M$ is not compact, so it's not the example that you are looking for. However, if we now use the fact that $H\simeq\mathrm{SL}(2,\mathbb{R})$, we can find a discrete subgroup $\Gamma\subset H=\mathrm{SL}(2,\mathbb{R})$ such that $\Gamma$ acts properly and discontinuously on $H/K = \Delta$ (i.e., the Poincaré disk) and such that the quotient $C = \Gamma\backslash (H/K)$ is a compact Riemann surface. Choosing $\Gamma$ to be an appropriate congruence subgroup, for example, we can even assume that $\Gamma$ preserves a lattice in $\mathbb{R}^2\simeq\mathbb{C}$. In other words, there exists a lattice $\Lambda\subset\mathbb{C}$ such that the abelian discrete subgroup of $G$ defined as $$ \hat\Lambda = \left\{\ \begin{pmatrix}1 & 0 & w\\ 0 & 1 & \bar{w}\\0&0&1\end{pmatrix}\ \ : w\in\Lambda\ \right\}, $$ is stable under conjugation by $\Gamma\subset H$. Finally, let $\hat\Gamma\subset G$ be the subgroup generated by $\Gamma\subset H\subset G$ and $\hat\Lambda$. Then I believe (but haven't had time to check the details) that $\hat\Gamma$ acts properly and discontinuously on $M = G/K$ with compact quotient. Since $\hat\Gamma$, being a subgroup of $G$, preserves the complex structure on $M$ and the foliation $\mathcal{F}$, it follows that these pass to the quotient $X = \hat\Gamma\backslash(G/K)$ and give an example of the desired kind.