Given
$\pi : Spec(A) \to Spec(B)$
with $B$ an integral domain, $A$ and $B$ noetherian, by generic freeness we may choose a nonzero $f \in B$ such that $A_f$ is free as a $B_f$-module.
The part I'm struggling to show is that if the rank of $A_f$ is nonzero then the image of $\pi$ contains $D_B(f)$. It's clear to me in the case that the rank is finite, as then $\pi$ is the spec of a finite, and thus integral extension. But it is certainly not the case that $\pi$ is integral in general, because $Spec(\mathbb{Z}[t] \to \mathbb{Z})$ satisfies our criteria. I'm assuming that if $A = \oplus_RB$, given $\mathfrak{q} \in Spec(B)$ we want to take $\oplus_R \mathfrak{q}$, which itself is the ideal generated by the image of $\mathfrak{q}$ in A, but I have not been able to show that this is in fact a prime ideal.
I think I got it.
Since $A$ is free as a $B$-module we have $B \hookrightarrow A$ So we might as well take it as a subring.
Let $\mathfrak{q} \leq B$ be prime and let $S=B - \mathfrak{q}$.
Then
$S^{-1}A \cong \oplus_R B_{\mathfrak{q}} $
and in particular we still have an inclusion.
Furthermore, we find that $\oplus_R \mathfrak{q}B_{\mathfrak{q}} = I$ is a proper ideal in $A$ because if $\{\varepsilon_i\}_{i \in R}$ is a basis for $A$ and $m \in \mathfrak{q}B_{\mathfrak{q}}$ then
$(m\varepsilon_i) \varepsilon_j = m \Sigma b_{ijk} \varepsilon_k = \Sigma mb_{ijk} \varepsilon_k \in I$
and $I$ is clearly proper and closed under addition.
Thus I is contained in some maximal ideal $\mathfrak{m} \leq A$, and since $B_{\mathfrak{q}}/\mathfrak{q}B_{\mathfrak{q}}$ is a field, the morphism induced into $A/ \mathfrak{m}$ is injective, so $\mathfrak{m} \cap B_{\mathfrak{q}} = \mathfrak{q}B_{\mathfrak{q}}$ and we're done.