The following modified form of Zariski's Main Theorem can help:
EGA IV3, Theorem 8.12.6 (pg 45 in link): Suppose $Y$ is quasicompact and quasiseparated. If $f:X\to Y$ is quasi-finite, separated, and of finite presentation, then $f$ factors as $X\hookrightarrow X'\to Y$ where the first morphism is an open immersion and the second is finite.
As all affine schemes are qcqs and all affine maps are separated, we may apply the theorem assuming the ring map is of finite presentation (which will be the case if both $X,Y$ are closed subvarieties of some finite-dimensional affine space as it seems that you assume). Here, as finite morphisms are affine, $X'$ is again affine and thus we may observe that $A(Y)\to A(X)$ is the composition of a finite ring map with a localization.
As to your final question about morphisms between varieties of the same dimension, your hypotheses are rather thin at the moment: you certainly need that the image of your subvariety can't be contained in any lower-dimensional subvariety, for instance. This doesn't completely do it, though - consider $\Bbb A^2\to \Bbb A^2$ by $(x,y)\mapsto (x,xy)$, which is even dominant but has an infinite fiber over the origin. You may find a reasonable list of conditions at Stacks, but it might not be everything you hoped for.