if $S$ is a ring (possibly without identity) with no proper left ideals, then either $S^2=0$ or $S$ is a division ring. I'm having trouble with this homework problem (from Algebra by Hungerford).

If $S$ is a ring (possibly without identity) with no proper left ideals, then either $S^2=0$ or $S$ is a division ring.

We've just proven in the previous part that if $S$ is a ring with identity and with no proper left ideals, then $S$ is a division ring. So the strategy is to suppose $S^2 \neq 0$ and prove that $S$ has an identity. The problem also has a hint:

Hint: Show that $\{a \in S \mid Sa = 0\}$ is an ideal. If $cd \neq 0$, show that $\{r \in S \mid rd = 0\} = 0$. Find $e \in S$ such that $ed = d$ and show that $e$ is a two-sided identity.


Here's what I have so far, with some boring details removed:
Note that $S_0 = \{a \in S \mid Sa = 0\}$ is an ideal, because [proof it's an ideal].
Since $S$ has no proper left ideals, we must have $S_0 = 0$ or $S_0 = S$. This means that either $S^2 = 0$ (if $S_0 = S$) or for every non-zero $a \in S$, there is some $b \in S$ with $ba \neq 0$ (if $S_0 = 0$). From now on suppose $S_0 = 0$, and we will show that $S$ is a division ring.
Note also that $A(d) = \{r \in S \mid rd = 0\}$ is a left ideal, because [proof it's a left ideal].
Now if $cd \neq 0$ for some $c, d \in S$, then $A(d) \neq S$ because $c \notin A(d)$; but $S$ has no proper left ideals, so $A(d) = 0$. Then $rd = sd$ if and only if $r = s$, for otherwise $(r-s)d = 0$ contradicts $A(d) = 0$.
Consider the left ideal $I_a = \{ra \mid r \in S\}$. [proof that it's a left ideal]. Since $S$ has no proper left ideals, we must have $I_a = 0$ or $I_a = S$ for all $a \in S$.
If $cd \neq 0$ then $I_d = S$ (so $I_d = S$ for all non-zero $d \in S$, since we showed that for all $d$ there is a $c$ with $cd \neq 0$), and therefore $d \in I_d$ so there is some $e \in S$ with $ed = d$. As we observed before, $rd = sd$ iff $r = s$, and $(re)d = r(ed) = rd$, so $re = r$ for each $r \in S$.

In summary, for every $a \in S$ we have some $e \in S$ (specific to this $a$) such that $e a = a$ and $r e = r$ for all $r \in S$. I feel like it should be very easy to show that there is a two-sided identity (e.g. by showing that all of these $e$ are in fact the same), but I can't seem to get there.
Thanks for any help!
 A: This question is apparently pointed to by similar questions, but lacks a transparent answer. This solution is meant to provide a simple solution to shore up those links.

Suppose that $S^2\neq 0$. Then there exists $a,b\in S$, such that $ab\neq 0$.
The right annihilator $\mathscr r(S)=\{x\in S\mid Sx=\{0\}\}$ is easily checked to be a two-sided ideal for any $s\in S$. The condition in the hypothesis says that this is always either $S$ or $\{0\}$. Our current assumption says $\mathscr r(S)=\{0\}$.
So except for $0$, all other elements $s$ have the property that $Ss=S$. This in turn implies that the left annihilators $\ell (s)=\{x\in S\mid xs=0\}$ are all zero whenever $s$ is nonzero (since they are necessarily left ideals). Finally, this means every nonzero element cancels on the right, since $(x-y)s=0$ implies $x-y=0$ if $s\neq 0$.
Starting again from $Sb=S$, there exists $e\in S$ such that $eb=b$. From $e^2b=eb$ we learn $e=e^2$, and clearly $e\neq 0$.  Now let $x\in S$: 


*

*$(xe-x)e=0$ implies $xe=x$ because $e$ can be cancelled off the right.

*If $(ex-x)$ were not zero, then we would be able to cancel it off the right of $e(ex-x)=0$ to get $e=0$, a contradiction, so in fact $ex=x$.


That establishes that $e$ is an identity for the ring.
From there on out it's easy. If $x$ is an arbitrary nonzero element of $S$, we have that $yx=e$ for some $y$, and subsequently that $zy=e$ for some $z$.  The usual trick of examining $zyx$ confirms that $x=z$ is the two-sided inverse for $y$, and $y$ is the two-sided inverse for $x$, so $x$ is invertible. That concludes the proof, since every nonzero element has been shown to be invertible.
A: It turns out that I missed a key implication in an earlier part of the proof: since $cd \neq 0$ implies $A(d) = 0$, and since we know for every $d$ there is such a $c$, we must have that $A(d) = 0$ for all $d$, and so $S$ has no zero divisors. This lets us use cancellation!
So the ending goes like this. Consider the left ideal $I_d = \{rd \mid r \in S\}$. We must have $I_d = 0$ or $I_d = S$, but we know that for $d \neq 0$ there is some $c$ such that $cd \neq 0$ so $I_d = S$. Thus $d \in I_d$, so there is some $e \in S$ with $ed = d$.
Now we use cancellation to say $ed = d \Rightarrow red = rd \Rightarrow re = r$ for all $r \in S$, and $e$ is a right identity; also $re = r \Rightarrow rex = rx \Rightarrow ex = x$ for all $x \in S$, and we see that $e$ is a two-sided identity. So we're done!
