The necessary condition that you write is also sufficient.  By construction, $Y$ is projective.  Thus, if there exists any "nondiagonal" divisor class, then (after twisting by a sufficient powers of an ample invertible sheaf) there exists a very ample invertible sheaf $\mathcal{L}$ on $Y$ whose restriction to each exceptional divisor $E_i$ is ample and "nondiagonal".  Denote by $N_i$ the normal bundle of $E_i$ in $Y$.  This is an antiample invertible sheaf that is diagonal.  Thus, there exist integers $d_i\geq 0$ such that the invertible sheaf $$\mathcal{M}:=\mathcal{L}\left( \sum_i d_i \underline{E}_i \right),$$ restricts on every $E_i$ as a globally generated invertible sheaf that is not big, i.e., it contracts one of the two rulings.

By Michael Artin's theorems in "Algebraization of Formal Moduli, II" (<b>ed.</b>I will add a reference soon) there exists a proper, birational morphism of normal, proper algebraic spaces, $$\nu:Y\to Z,$$ and a nef invertible sheaf $\mathcal{N}$ on $Z$ such that $\nu^*\mathcal{N}$ equals $\mathcal{M}$ and such that $\nu$ contracts a curve in $E_i$ if and only if it has zero intersection number with $\mathcal{M}$.  

To prove that $\mathcal{N}$ is ample, it suffices to use the version of the Nakai-Moishezon Criterion for algebraic spaces proved by J&aacute;nos Koll&aacute;r, Theorem 3.11, p. 248 of the following.

MR1064874 (92e:14008) <br>
Kollár, János <br>
Projectivity of complete moduli. <br>
J. Differential Geom. 32 (1990), no. 1, 235–268. <br>
https://projecteuclid.org/download/pdf_1/euclid.jdg/1214445046

<B>Nakai-Moishezon hypothesis for curves.</B> To check the hypotheses of the Nakai-Moishezon criterion, begin with irreducible curves.  Every irreducible curve in $Z$ is the finite image of an irreducible curve in $Y$.  If that curve is not contained in any divisor $E_i$, then its intersection with each of these is nonnegative.  Since also the intersection of the curve with $c_1(\mathcal{L})$ is positive, the intersection of the irreducible curve with $c_1(\mathcal{M})$ is also positive.  Also, the restriction of $\mathcal{M}$ to each $E_i$ is globally generated and has zero intersection number only on those curves contracted by $\nu$.  Thus, for every irreducible curve in $E_i$ that maps finitely to its image in $Z$, the intersection number with $c_1(\mathcal{M})$ is positive.

<B>Nakai-Moishezon hypothesis for surfaces.</B> Next consider surfaces.  As above, it suffices to check for every noncontracted irreducible surface in $Y$ that the intersection number with $c_1(\mathcal{M})\smile c_1(\mathcal{M})$ is positive.  For an irreducible surface that is contained in none of the divisors $E_i$, the intersection of every $E_i$ with the surface is an effective curve.  Also the intersection of the surface with a general member of the linear system of the very ample invertible sheaf $\mathcal{L}$ is an effective curve, at least one component of which is contained in no $E_i$. Thus, the intersection class of the surface with $c_1(\mathcal{M})$ is rationally equivalent to a nontrivial effective curve, at least one component of which is contained in no $E_i$.  Now apply the previous paragraph to deduce that intersection number of this curve with $c_1(\mathcal{M})$ is positive.  Since each surface $E_i$ is contracted by $\nu$, we do not need to check the criterion for these surfaces.

<B>Nakai-Moishezon hypothesis for threefolds.</B> Finally, $c_1(\mathcal{M})$ restricts to a divisor class on each $E_i$ that is effective.  Thus, since the restriction of the effective divisor class $c_1(\mathcal{M})$ to a general member of the complete linear system of $\mathcal{L}$ is also effective, the intersection class $c_1(\mathcal{M})\smile c_1(\mathcal{M})$ is rationally equivalent to an effective curve, not all of whose components are contained in exceptional divisors $E_i$.  Thus, by the first paragraph once more, the intersection number of this curve with $c_1(\mathcal{M})$ is positive, i.e., $c_1(\mathcal{M})\smile c_1(\mathcal{M})\smile c_1(\mathcal{M})$ has positive degree.  Altogether, this confirms the Nakai-Moishezon criterion for ampleness of $\mathcal{N}$ on $Z$.