  Let $\mathcal{F}$ be a foliation defined on a complex projective manifold $M$
of dimension $n$ and admitting a holomorphic vector field $X$ tangent to it
along some non-empty Zariski-open set. In this paper we prove that if $X$ has
sufficiently many integral curves that are given by meromorphic functions
defined on $\mathbb{C}$ then the restriction of $\mathcal{F}$ to any invariant
complex $2$-dimensional analytic set admits a first integral of Liouvillean
type. In particular, on $\mathbb{C}^3$, every rational vector fields whose
solutions are meromorphic functions defined on $\mathbb{C}$ admits a non-empty
invariant analytic set of dimension $2$ where the restriction of the vector
field yields a Liouvillean integrable foliation.
