Fraleigh, in his algebra book, defined an ideal $N$ to be an additive subgroup of a ring $R$ such that for all $a$, $b \in R$, $aN \subset N$ and $Nb \subset N$.
I've come accrosed another definition: An ideal $N$ of a commutative ring $R$ is a subset of $R$ such that
- $0 \in N$
- $a+b \in N$ for all $a$, $b \in N$
- $ra \in N$ for all $r \in R$ and $a \in N$
In the second definition, can you explain why the additive inverse of each element of $N$ exists (since $N$ is an additive subgroup by the definition of Fraleigh)? Also, do we need $R$ to be commutative for it to have an ideal?
As I was saying in the second case, the author probably uses an unitary commutative ring. Which means $\forall a,b \in A, \, ab = ba$ and there is a neutral element for the multiplication denoted $1_A$ or $1$.
If you wish to prove the inverse stability, just remark that if $a \in I$, $-1 \cdot a = -a \in I$.
However rings are usually not commutative (e.g. ring of matrices) and sometimes not unitary (it also depends on the country's conventions). This is why you should stick to the first definition (which is called a bilateral ideal) and not the second in case of doubt.
There is still something to add: ideals are meant to quotient rings, and in the vast majority of cases, your ring will be commutative and unitary. The second one is thus more practical.