# Correction:

The argument I gave initially is wrong. I treated $\mathfrak X(M)'$ like the space of differential forms. Only operations on $\mathfrak X(M)$ go over to the dual as (negative) adjoint operations, so $\mathcal L_X$ makes sense but $i_X$ and $d$ do not. Since it created some interest I leave the old answer.

# Corrected argument:

Let $\alpha$ be a 1-form on $M$ which is non-zero and closed near a point $p$ in $M$. Then consider the current $\alpha. \delta_p \in \mathfrak X(M)'$ where $\delta_p$ is the Dirac delta. Consider the the space
$$
L^{\alpha}_p = \{X\in \mathfrak X(M): \mathcal L_X(\alpha. \delta_p)=0\}
$$
Let us compute this space. The question is local, so we assume that we are in $\mathbb R^n$ and $p=0$.
Since $\mathcal L_X$ acts as the negative adjoint, for an arbitrary field $Y$ we have
$$
0=\langle Y, \mathcal L_X(du^1.\delta_p)\rangle =
-\langle \mathcal L_XY, du^1.\delta_p\rangle = -[X,Y]^1(0) = \big(-(\partial_iY^1(0))X^i(0) + (\partial_iX^1(0))Y^i(0)\big)\partial_1
$$
Running $Y$ through a basis of $T_0M$ with $\partial_i Y(0)=0$ for all $i$
implies that $\partial_i X^1(0)=0$ $ \forall i$.
Choosing $Y$ with $Y(0)=0$ in such a way that $dY^1$ runs through a basis of $T_0^*M$, implies $X^i(p)=0$. The converse is also true, thus
$$
L^{\alpha}_0 = \{X\in \mathfrak X(\mathbb R^n): dX^1(0)=0, X(0)=0 \}
$$
which has codimension $2n$, SIGH.

# Remark, and proof of the statement in the question:

In a related question it was hinted that the determination of all the maximal ideals of $\mathfrak X(M)$ would be of interest. These are all of infinite codimension and are of the form: For a point $p$ in $M$ consider all vector fields $X$ which vanish at $p$ of infinite order. Here $M$ should be compact or $\mathfrak X(M)$ should be replaced by the space of vector fields with compact support. This is proved by Purcell and Shanks: For a related result and references see

- MR0516602 Grabowski, J. Isomorphisms and ideals of the Lie algebras of vector fields. Invent. Math. 50 (1978/79), no. 1, 13–33.

In fact, this paper contains a proof of your question:
Let $M$ be compact or replace $\mathfrak X(M)$ by the Lie algebra $\mathfrak X_c(M)$ of vector fields with compact support. So let $A=C^\infty_c(M)$ and let $\mathcal L = \mathfrak X_c(M)$. By Proposition 3.6, they satisfy the assumtions of the following theorem.

Theorem 5.1. Let $A$ be an $I$-algebra and let $\mathcal L$ be an admissible $A$-Lie module. Then for each maximal-prime finite-codimensional ideal $J$ of $A$ the Lie subalgebra $\mathcal L_J$ of
$\mathcal L$ is maximal finite-codimensional and the mapping
$\mathfrak M_A \ni J \mapsto \mathcal L_J\in \mathfrak M_{\mathcal L}$
is a bijection.

Since $\mathfrak M_A = \{A_p: p\in M\}$ and $\mathcal L_J =\{X\in \mathcal L: X(A)\subset J\}$, the result follows.
For notation see Grabowski's paper.

# Old, wrong answer:

Here is a counterexample: Let $\alpha$ be a 1-form on $M$ which is non-zero and closed near a point $p$ in $M$. Then consider the current $\alpha\otimes \delta_p \in \mathfrak X(M)'$ where $\delta_p$ is the Dirac delta. Consider the space of all $X\in\mathfrak X(M)$ with $i_X(\alpha\otimes\delta_p) = 0$ and $\mathcal L_X(\alpha\otimes\delta_p) = 0$. Since $i_{[X,Y]} = [i_X,\mathcal L_Y]$ and $\mathcal L_{[X,Y]} =[\mathcal L_X,\mathcal L_Y]$, this space is a Lie algebra.
Its codimension is 2.

More detail:
Choose a Riemannian metric $g$ on $M$ and and consider a chart $(U,u)$ centered at $p$ such that $\alpha|_U = du^1$. Then
$0 = i_X(du^1\otimes\delta_p) = du^1(X)(p)= X^1(p)$
and
$0=\langle Y, \mathcal L_X(du^1\otimes\delta_p)\rangle
= \langle Y, (i_Xd + di_X) (du^1\otimes\delta_p)\rangle
= -\langle Y, i_X(du^1\wedge d\delta_p)\rangle
= -X^1(p) \text{div}(Y)(p) + Y^1(p) \text{div}(X)(p).
$

Since $X^1(p)=0$ and $Y$ is arbitrary, we see that the Lie subalgebra is given by $\{X: X^1(p)=0, \text{div}(X)(p)=0\}$ and thus has thus has codimension $2$. The divergence is with respect to the density of $g$.

One can also use $\text{div}(f.X) = f\text{div}(X) + g(\text{grad}^g(f),X)$ to make a more local computation.