Perhaps a broader context will be valuable. Let $R$ be a commutative ring (noncommutativity isn't relevant to the point I'm trying to make) and $M$ a module over it. We say that $M$ is finitely generated if there exist $m_1, ... m_n \in M$ such that every element of $M$ can be written in the form
$$m = r_1 m_1 + ... + r_n m_n.$$
When $R$ is a field $k$, an $R$-module is precisely a $k$-vector space, and a finitely generated $R$-module is precisely a finite-dimensional $k$-vector space. (Note that I can define "finite-dimensional" without defining "dimension.")
We say that $m_1, ... m_n$ is a basis of $M$ if it is a generating set which is linearly independent in the sense that if
$$0 = r_1 m_1 + ... + r_n m_n$$
then $r_1 = ... = r_n = 0$. This is equivalent to saying that each element of $M$ is uniquely expressible as a sum of the $m_i$. Abstractly, it says that the natural map
$$R^n \to M$$
given by sending $(r_1, ... r_n)$ to $r_1 m_1 + ... + r_n m_n$ is an isomorphism of $R$-modules. When $M$ has this property in module theory, we say that $M$ is a free module.
To say that every finite-dimensional vector space has a basis is to say that every finitely generated module over a field is free. It may be useful to see why this is false for more general rings: for example, a $\mathbb{Z}$-module is just an abelian group, and a $\mathbb{Z}$-module such as $\mathbb{Z}/p\mathbb{Z}$ ($p$ a prime) cannot be free. Indeed, no generating set can be linearly independent since $pm = 0$ for all $m$.
More generally, if $R$ is a commutative ring and $I$ a nontrivial ideal of it, then $R/I$ is never free. Thus the only commutative rings $R$ for which every finitely generated module is free are those with no nontrivial ideals, and this is one of several equivalent ways to define a field.
When $R$ is noncommutative, a more astonishing thing that can go wrong is that free modules can fail to have invariant basis number.