In the theory of generalized (curvilinear) coordinates, usually one defines coordinates first, e.g. $(u^1,u^2,u^3)$, then a position vector $\mathbf{r}(u^1,u^2,u^3)$, and finally the basis vectors, $$ e_i = \frac{\partial \mathbf{r}}{\partial u^i} $$ and the reciprocal (dual) basis vectors, $$ e^i = \nabla u^i $$ Suppose instead that you know a set of basis vectors at every point in $\mathbb{R}^3$, e.g. you are given $e_i$ (or $e^i$). Is it possible to compute the coordinates $(u^1,u^2,u^3)$ given these basis vectors?
As a simple/specific example, suppose you are given the spherical basis vectors $\hat{r},\hat{\theta},\hat{\phi}$ in their Cartesian components everywhere in $\mathbb{R}^3$. Could you then conclude that $r,\theta,\phi$ are the corresponding coordinates? How would you go about doing this? It seems to me that you would need to compute the integral curves of each basis vector and then use those curves to determine the coordinates, but its unclear exactly how to do this.
As a follow-up question, suppose you are given basis vector fields $e^i$ which are not conservative -- e.g. there is no function $u^i$ such that $e^i = \nabla u^i$. Does this mean there are no coordinates corresponding to the given $e^i$?