Disclaimer: I haven't though of this issue before so this is my attempt at figuring out what is going on. I believe it's correct but no guarantees.
It depends on what your base field is. As you've noticed, the tangent space in general only makes sense with respect to a field. So fixing a field $k$, the $k$ tangent space of $X$ at a $k$-rational point $x$ can be thought of as the set of $k$-morphisms $\operatorname{Spec}k[\epsilon]/(\epsilon^2) \to X$ sending the maximal ideal of $\operatorname{Spec}k[\epsilon]/(\epsilon^2)$ to $x \in X$.
So such a morphism picks out a $k$-rational point of $X$ and a tangent vector $\textit{defined over}$ $k$ at $x$. So in particular, if we're viewing $X$ and $Y$ as $k$-schemes, then a $k$-morphism from $X$ to $Y$ induces a linear map of the $k$ tangent spaces. In particular, $k \hookrightarrow k(x)$ and $k \hookrightarrow k(f(x))$ so the cotangent spaces are both vector spaces over $k$. Thus, in your notation the $k$ tangent spaces are the $k$ duals of cotangent spaces and the induced map on tangent spaces is as $k$ vector spaces.
So, in your example, both constructions are meaningful. The first, where you view everything as $k(f(x))$ vector spaces and take the $k(f(x))$ dual is the induced map on tangent spaces over $k(f(x))$, while the second where you tensor by $k(x)$ and take the $k(x)$ dual is the induced map of $k(x)$ tangent spaces of the $\textit{base extension}$ of your morphism to $k(x)$.
Here is an example. Take
$$
\operatorname{Spec} \mathbb{C}[x] \to \operatorname{Spec} \mathbb{R}[x] \text{ induced by the inclusion } \mathbb{R}[x] \hookrightarrow\mathbb{C}[x].
$$
Then these schemes and the morphism are defined over $\mathbb{R}$. This is the double cover $\mathbb{A}^1_{\mathbb{C}} \to \mathbb{A}^1_{\mathbb{R}}$. Let's look at the cotangent spaces at the origin. The induced map on residue fields is $\mathbb{R} \to \mathbb{C}$ and on cotangent spaces is the same inclusion viewed as $\mathbb{R}$ vector spaces. Taking $\mathbb{R}$ duals gives the map on $\mathbb{R}$ tangent spaces as the projection from the two dimensional real vector space $\mathbb{C}$ to the real line.
Now if we instead tensor everything with $\mathbb{C}$, then the map on tangent spaces is now the projection from a two dimensional complex space $\mathbb{C} \otimes_\mathbb{R} \mathbb{C}$ to the one dimensional complex vector space $\mathbb{R} \otimes_\mathbb{R} \mathbb{C}$ which corresponds to the double cover $\mathbb{A}^1_\mathbb{C} \otimes_\mathbb{R} \mathbb{C} = \mathbb{A}^1_\mathbb{C} \sqcup \mathbb{A}^1_\mathbb{C} \to \mathbb{A}^1_\mathbb{R} \otimes_\mathbb{R} \mathbb{C} = \mathbb{A}^1_\mathbb{C}$.