This is from Seth Warner's Classical Modern Algebra.
The problem is:
If $A$ is a nontrivial $K$-algebra possessing no nonzero proper ideals, then there are no nonzero proper ideals of the ring $A$. [Hint: show that a nonzero ideal of the ring $A$ contains the submodule generated by $A^2$.]
According to the book: An ideal of an algebra $A$ is a subset of $A$ that is both an ideal of the ring $A$ and a $K$-submodule of $A$. In other words, a nonempty subset $C$ of a $K$-algebra $A$ is an ideal if and only if for all $a$, $b$ in $C$, for all $x$ in $A$, and for all all $e$ in $K$, the elements $a+b$, $xa$, $ax$, and $ea$ belong to $C$.
Thanks.
Let $A$ be a unital $K$-algebra, and $I$ an ideal of $A$. Then $I$ is also a $K$-submodule of $A$: take $a\in K$ and $x\in I$. Then $a*x=a*(x\cdot 1_A)=x\cdot(a* 1_A)\in I$. (Here $*:K\times A\to A$.)
If $A$ is not unital, as the question suggests and some comments require, let's consider $I$ a nonzero ideal of $A$. Let $J=\{x\in A:xA\subseteq I\}$. Then $J$ is an ideal of $A$ that contains $I$. Moreover, $J$ is an ideal of $A$ as a $K$-algebra, that is, for $\lambda\in K$, $x\in J$, we have $\lambda*x\in J$. This shows that $J=A$ and therefore $A^2\subseteq I$. But $A^2$ is an ideal of $A$ as a $K$-algebra and since the multiplication on $A$ is not trivial we get $A^2=A$, so $A\subseteq I$ and thus $A=I$.