The answer is *no* in general, as shown by the following example. Let $f \colon X \to Y$ be an étale (i.e., unramified) double cover of projective curves over $\mathbb{C}$, with $g(X) \geq 3$ (for instance, we can take $g(X)=3$, $g(Y)=2$). Then the ramification locus is empty. However, the generator $f$ of the $\mathbb Z / 2 $-extension $K(X)/K(Y)$ must necessarily vanish somewhere on $X$. Indeed, since $X$ is compact, there exist no non-constant holomorphic functions on it, hence $f$ has at least one pole. But the Residue Theorem implies that the number of zeroes of $f$ equals the number of poles (if counted with multiplicities), so $f$ has at least one zero on $X$.