Yes, this is true.
First approach
Let more generally $(\mathfrak{g}, [-,-]_1)$ be a Lie algebra over some field $K$.
If $\mathfrak{h}$ is a $K$-vector space of the same dimension as $\mathfrak{g}$ then there exists an isomorphism of vector spaces
$$
\varphi
\colon
\mathfrak{h}
\to
\mathfrak{g} \,.
$$
We can use this isomorphism of vector spaces to pull back the Lie bracket on $\mathfrak{g}$ to a Lie bracket on $\mathfrak{h}$.
More precisely, we set
$$
[x, y]_2
:=
\varphi^{-1}( [ \varphi(x), \varphi(y) ]_1 )
$$
for all $x, y \in \mathfrak{h}$.
This defines a Lie bracket on $\mathfrak{h}$, and the vector space isomorphism $\varphi$ becomes an isomorphism of Lie algebras
$$
\varphi
\colon
( \mathfrak{h}, [-,-]_2 )
\to
( \mathfrak{g}, [-,-]_1 ) \,.
$$
(This Lie bracket $[-,-]_2$ is the unique Lie bracket on $\mathfrak{h}$ which makes $\varphi$ into an isomorphism of Lie algebras.)
Suppose now that $K = \mathbb{R}$ and that the Lie algebra $\mathfrak{g}$ is of finite dimension $n$.
If $x_1, \dotsc, x_n$ is a basis of $\mathfrak{g}$ then we get an isomorphism of vector spaces
$$
\varphi
\colon
\mathbb{R}^n
\to
\mathfrak{g} \,,
\quad
e_i
\mapsto
x_i
\qquad
\text{for all $i = 1, \dotsc, n$,}
$$
where $e_1, \dotsc, e_n$ denotes the standard basis of $\mathfrak{g}$.
As explained above we can pull back the Lie bracket $[-,-]_1$ on $\mathfrak{g}$ to a Lie bracket $[-,-]_2$ on $\mathbb{R}^n$ such that $\varphi$ becomes an isomorphism of Lie algebras.
Second approach
There is also a less abstract but equivalent way of explaining the above procedure.
Suppose again that $(\mathfrak{g}, [-,-]_1)$ is a Lie algebra over a field $K$ and let $x_1, \dotsc, x_n$ be a basis of $\mathfrak{g}$.
We can then consider the structure constants of $[-,-]_1$ with respect to the basis $x_1, \dotsc, x_n$.
These are the unique coefficients $c_{ij}^k \in K$ with
$$
[x_i, x_j] = \sum_{k=1}^n c_{ij}^k x_k
$$
for all $i, j = 1, \dotsc, n$.
That $[-,-]_1$ is a Lie bracket on $\mathfrak{g}$ is equivalent to the conditions
\begin{equation}
c_{ii}^\ell = 0 \,,
\quad
c_{ij}^\ell + c_{ji}^\ell = 0 \,,
\quad
\sum_{k=1}^n
( c_{ij}^k c_{k \ell}^m + c_{j \ell}^k c_{ki}^m + c_{\ell i}^k c_{kj}^m ) = 0
\tag{1}
\end{equation}
for all $i, j, \ell, m = 1, \dotsc, n$.
If we are now given another $K$-vector space $\mathfrak{h}$ with basis $y_1, \dotsc, y_n$ then we can define a unique bilinear map
$$
[-,-]_2
\colon
\mathfrak{h} \times \mathfrak{h}
\to
\mathfrak{h}
$$
such that
$$
[y_i, y_j]
:=
\sum_{k=1}^n c_{ij}^k y_k
$$
for all $i,j = 1, \dotsc, n$.
The structure constants of $[-,-]_2$ with respect to the basis $y_1, \dotsc, y_n$ of $\mathfrak{h}$ are (by construction) the same as the structure constants of $[-,-]_1$ with respect to the basis $x_1, \dotsc, x_n$ of $\mathfrak{g}$.
It follows that $[-,-]_2$ is a Lie bracket on $\mathfrak{h}$ since the conditions $(1)$ are satisfied.
Moreover, there exists a unique linear map $\varphi$ from $\mathfrak{h}$ to $\mathfrak{g}$ with
$$
\varphi(y_i) = x_i
$$
for all $i = 1, \dotsc, n$, and this linear map is an isomorphism of Lie algebras from $(\mathfrak{h}, [-,-]_2)$ to $(\mathfrak{g}, [-,-]_1)$.
In the given situation we have $K = \mathbb{R}$ and can choose $\mathfrak{h} = \mathbb{R}^n$ and for $y_1, \dotsc, y_n$ the standard basis of $\mathbb{R}^n$.
Best Answer
I found myself working on this same problem (for homework), and I think I've written a fairly detailed solution. So I will post it here, in case it is helpful to anyone else.
Let $\mathfrak{g}$ be a 1-dimensional Lie algebra, and let $\{E_1\}$ be a basis for $\mathfrak{g}$. Then for any two vector fields $X,Y\in\mathfrak{g}$, we have $X=aE_1$ and $Y=bE_1$, for some $a,b\in\mathbb{R}$. Thus, $$[X,Y]=[aE_1,bE_1]=ab[E_1,E_1]=0$$ for all $X,Y\in\mathfrak{g}$. Therefore, the only 1-dimensional Lie algebra is the trivial one. The map $$\varphi:\mathfrak{g}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_1\mapsto \left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_1,bE_1])=\varphi(0)=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right)\mbox{, and}$$ $$[\varphi(aE_1),\varphi(bE_1)]=\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)\left(\begin{array}{ll} b&0\\ 0&0 \end{array}\right)-\left(\begin{array}{ll} b&0\\ 0&0 \end{array}\right)\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right).$$ Thus, $\mathfrak{g}$ is isomorphic to the (abelian) Lie subalgebra $$\varphi(\mathfrak{g})=\left\{\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$
Now let $\mathfrak{h}$ be a 2-dimensional Lie algebra, and let $\{E_1,E_2\}$ be a basis for $\mathfrak{h}$. Then for any two vector fields $X,Y\in\mathfrak{h}$, we have $X=aE_1+bE_2$ and $Y=cE_1+dE_2$, for some $a,b,c,d\in\mathbb{R}$. Thus, $$\begin{array}{ll} [X,Y]&=[aE_1+bE_2,cE_1+dE_2]\\ &=a[E_1,cE_1+dE_2]+b[E_2,cE_1+dE_2]\\ &=ac[E_1,E_1]+ad[E_1,E_2]+bc[E_2,E_1]+bd[E_2,E_2]\\ &=(ad-bc)[E_1,E_2]. \end{array}$$
If $[E_1,E_2]=0$, then we have the trivial 2-dimensional Lie algebra. The map $$\varphi:\mathfrak{h}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_1+bE_2\mapsto \left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_1+bE_2,cE_1+dE_2])=\varphi(0)=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right)\mbox{, and}$$
$$[\varphi(aE_1+bE_2),\varphi(cE_1+dE_2)]=\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)\left(\begin{array}{ll} c&0\\ 0&d \end{array}\right)-\left(\begin{array}{ll} c&0\\ 0&d \end{array}\right)\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right).$$Furthermore, this map is faithful (injective). Thus, $\mathfrak{h}$ is isomorphic to the (abelian) Lie subalgebra $$\varphi(\mathfrak{h})=\left\{\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a,b\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$
If $[E_1,E_2]\neq0$, then set $E_3=[E_1,E_2]$. Then for all $X,Y\in\mathfrak{h}$ we have $[X,Y]=\lambda E_3$ for some $\lambda\in\mathbb{R}$. In particular, for any $E_4\in\mathfrak{g}$ such that $E_4$ and $E_3$ are linearly independent, we have $[E_4,E_3]=\lambda_0 E_3$. Replacing $E_4$ with $1/\lambda_0 E_4$, we now have a basis $\{E_4, E_3\}$ for $\mathfrak{g}$ such that $[E_4, E_3]=E_3$. The map $$\varphi:\mathfrak{h}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_4+bE_3\mapsto \left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_4+bE_3,cE_4+dE_3])=\varphi((ad-bc)E_3)=\left(\begin{array}{ll} 0&ad-bc\\ 0&0 \end{array}\right)\mbox{, and}$$
$$[\varphi(aE_4+bE_3),\varphi(cE_4+dE_3)]=\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)\left(\begin{array}{ll} c&d\\ 0&0 \end{array}\right)-\left(\begin{array}{ll} c&d\\ 0&0 \end{array}\right)\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&ad-bc\\ 0&0 \end{array}\right).$$Furthermore, this map is faithful (injective). Thus, $\mathfrak{h}$ is isomorphic to the (non-abelian) Lie subalgebra $$\varphi(\mathfrak{h})=\left\{\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a,b\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$