Ring With Unity As a Direct Sum of Non-Zero Ideals
Your notation is a bit awkward. Your given data is a family $(A_i)_{i\in I}$ of nonzero ideals and you know that, as an abelian group, $$ R=\bigoplus_{i\in I}A_i $$ In particular, every element $r\in R$ can be uniquely written as $$ r=\sum_{i\in I}r_i \qquad(r_i\in A_i) $$ where all but a finite number of the summands $r_i$ are nonzero.
Let $1=\sum_{i\in I}e_i$ and fix a nonzero element $x_j\in A_j$. Then $$ x_j=x_j1=x_j\biggl(\sum_{i\in I}e_i\biggr)=\sum_{i\in I}(x_je_i) $$ By the uniqueness of representation, we must have $$ x_je_i=\begin{cases} x_j & \text{if $i=j$}\\ 0 & \text{if $i\ne j$} \end{cases} $$ because $x_je_i\in A_j$, since $A_j$ is an ideal. In particular, $e_j\ne0$ for all $j\in I$.
Thus $I$ is finite.
Note that only the fact that every $A_i$ is a right ideal has been used. For the case with left ideals, just use $1x_j=x_j$.