A connected Lie group with a lattice is unimodular. In dimension $\le 3$, we can list them and check that they admit cocompact lattices.

The full list:

1) compact ones ($\{1\}$ is a cocompact lattice): tori of dimension $0,1,2,3$, $\mathrm{SO}(3)$ and its two-fold covering $\mathrm{SU}(2)$.

2) non-compact non-solvable ones: connected coverings of $\mathrm{PSL}_2(\mathbf{R})$. The inverse image of a surface group is a cocompact lattice.

3) simply connected solvable ones:

beyond $\mathbf{R}^i$ for $i=0,1,2$, these are all of the form $\mathbf{R}^2\rtimes\mathbf{R}$. To be unimodular, the action has to be of determinant 1. This gives 4 cases:

3a) trivial action $\mathbf{R}^3$: $\mathbf{Z}^3$ is a cocompact lattice;

3b) unipotent action: Heisenberg group. The integral Heisenberg group is a cocompact lattice

3c) rotation action (hence not faithful): some central subgroup $\mathbf{Z}^3$ is a lattice.

3d) diagonal determinant 1 action: this is called group SOL. Each $\mathbf{Z}^2\rtimes\mathbf{Z}$ is a cocompact lattice therein, when the action is by powers of a matrix in $\mathrm{SL}_2(\mathbf{Z})$ with trace $\ge 3$.

4) The non-simply connected solvable non-compact ones are covered by the previous ones (modding out by a discrete central subgroup).

4a) Covered by 3a: this gives $\mathbf{R}^3/\mathbf{Z}$ and $\mathbf{R}^3/\mathbf{Z}^2$, which admit $\mathbf{Z}^2$ and $\mathbf{Z}$ as cocompact lattices.

4b) Covered by 3b: this gives Heisenberg modulo central $\mathbf{Z}$, which admits $\mathbf{Z}^2$ as cocompact lattice.

4c) Covered by 3c: this gives the oriented isometry group of the plane $\mathrm{SO}(2)\ltimes\mathbf{R}^2$ and its finite cover, which admit $\mathbf{Z}^2$ as cocompact lattice.

Remark: In dimension 4, there are continua of non-isomorphic unimodular groups of the form $\mathbf{R}\ltimes\mathbf{R}^3$, diagonal action. Most of these have no lattices.