Then $\mathfrak{h}$ is invariant under the action by conjugation of $\mathrm{SO}_n(\mathbf{R})$. Now (seeas mentioned in the post by Venkataramana), we can decompose $\mathfrak{sl}_n(\mathbf{R})$ as a $\mathrm{SO}_n(\mathbf{R})$-representation, namely $\mathfrak{gl}_n(\mathbf{R}) = \mathfrak{so}_n(\mathbf{R})\oplus\mathfrak{p}$$\mathfrak{sl}_n(\mathbf{R}) = \mathfrak{so}_n(\mathbf{R})\oplus\mathfrak{p}$, where $\mathfrak{p}$ is the set of symmetric matrices with trace zero. Then for all $n \ge 2$ (including $n=2$), $\mathfrak{p}$ is irreducible;irreducible (see a proof below); it follows that the subspaces of $\mathfrak{gl}_n(\mathbf{R})$$\mathfrak{sl}_n(\mathbf{R})$ containing $\mathfrak{so}_n(\mathbf{R})$ and invariant under conjugation by $\mathrm{SO}_n(\mathbf{R})$ are $\mathfrak{so}_n(\mathbf{R})$ and $\mathfrak{so}_n(\mathbf{R})\oplus\mathfrak{p}=\mathfrak{sl}_n(\mathbf{R})$.
If $H$ is contained in $\mathrm{SO}_n(\mathbf{R})$ then we are in one of the first cases. Conversely, if $H$ is not contained in $\mathrm{SO}_n(\mathbf{R})$ then since the latter is the stabilizer of $\mathfrak{so}_n(\mathbf{R})$ in $\mathrm{SL}_n(\mathbf{R})$ (see a proof below), we deduce that $\mathfrak{h}$ contains a conjugate of $\mathfrak{so}_n(\mathbf{R})$ distinct from $\mathfrak{so}_n$. Hence we are in the second case, that is, $\mathfrak{h}=\mathfrak{sl}_n(\mathbf{R})$. In this case we can pick a basis $(e_1,\dots,e_m)$ of $\mathfrak{sl}_n(\mathbf{R})$ ($m=n^2-1$) and functions $u_1,\dots,u_m:\mathbf{R}\to H$ as in the definition of $\mathfrak{h}$ with $u'_i(0)=e_i$. It follow that the differential of the function $(u_1,\dots,u_m):\mathbf{R}^m\to H\subset\mathrm{SL}_n(\mathbf{R})$ at zero is surjective. Hence its image contains a neighborhood of $I_n$ in $\mathrm{SL}_n(\mathbf{R})$. Thus $H$ is open in $\mathrm{SL}_n(\mathbf{R})$ and hence by connectedness of the latter, is equal to $\mathrm{SL}_n(\mathbf{R})$.
Now remove the assumption that $H$ is in $\mathrm{SL}_n(\mathbf{R})$. If $H\cap\mathrm{SL}_n(\mathbf{R})=\mathrm{SO}_n(\mathbf{R})$, then $H$ is contained in the normalizer $\mathbf{R}^*\mathrm{O}_n(\mathbf{R})$ of $\mathrm{SO}_n(\mathbf{R})$. Otherwise, we deduce from the previous case that $H\cap\mathrm{SL}_n(\mathbf{R})$ equals $\mathrm{SL}_n(\mathbf{R})$, that is to say, $H$ contains $\mathrm{SL}_n(\mathbf{R})$. This finishes the proof.
Addendum: proof of some basic facts (asked in a comment)
Proof that the action of $\mathrm{SO}_n(\mathbf{R})$ on $\mathfrak{p}$ is irreducible for $n\ge 2$. First, consider the action of the subgroup of signed permutation matrices with determinant 1 on the subspace $D\subset\mathfrak{p}$ of diagonal matrices with trace zero. It factors through the action of permutation matrices (not only even ones, using $n\ge 2$) on the set of $n$-vectors with sum zero (by permutation of coordinates), and this action is well-known and easily checked to be irreducible.
Now let $V$ be a nonzero $\mathrm{SO}_n(\mathbf{R})$-invariant subspace of $\mathfrak{p}$. Picking a nonzero element in $V$, it has a $\mathrm{SO}_n(\mathbf{R})$-conjugate that is diagonal. Therefore $V\cap D\neq 0$, and by the previous irreducibility fact, $D\subset V$. Now any element of $\mathfrak{p}$ has a $\mathrm{SO}_n(\mathbf{R})$-conjugate that is diagonal, so $V=\mathfrak{p}$. $\Box$
Proof that the stabilizer $N$ of $\mathfrak{so}_n(\mathbf{R})$ in $\mathrm{SL}_n(\mathbf{R})$ is $\mathrm{SO}_n(\mathbf{R})$. The set of $\mathfrak{so}_n(\mathbf{R})$-invariant scalar products on $\mathbf{R}^n$ is the line generated by the standard scalar product (that it is reduced to a line follows from the absolute irreducibility of the $\mathfrak{so}_n(\mathbf{R})$-action on $\mathbf{R}^n$). Hence this line is $N$-invariant. The stabilizer (in $\mathrm{GL}_n(\mathbf{R})$) of this line is by definition the group of similarities, hence its stabilizer in $\mathrm{SL}_n(\mathbf{R})$ is the group of similarities of determinant 1, that is, $N=\mathrm{SO}_n(\mathbf{R})$. $\Box$