The question, of course, is what do you mean by "set theory". Some set theories allow for a set to be a member of itself, some allow it but exclude sets of the form $A=\{A\}$, others do not allow sets to be members of themselves at all.
Naively, writing something like $A=\{A\}$, is much like writing the equation $x^2=-1$, just because we wrote it doesn't mean it has a solution. Sometimes it does, for example in $\Bbb C$, and sometimes it doesn't, e.g. in $\Bbb R$. The same holds for $A=\{A\}$.
However, if the equation does have a solution, then we have that $A=\{A\}$ and therefore $A=\{\{A\}\}$ and also $A=\{A\}=\{A,A\}=\{A,\{A\}\}=\{A,\{A\},\{\{A\}\}\}$ and so on. The reason, of course, is that once we know that two objects are equal we are allowed to replace the instance of one by another; and since any self-respecting set theory will have an Extensionality axiom for sets, we can add "duplicates" without changing the set.
So, your conclusion of the matter is not correct. The reason we normally exclude sets of the form $A=\{A\}$ is that the standard set theory is Zermelo–Fraenkel set theory (almost always with the Axiom of Choice added as well), where we have the Axiom of Regularity (also known as Foundation sometimes). This axiom states that given any non-empty set $X$, there is some $Y\in X$ such that $X\cap Y$ is empty. This may seem weird, but remember that in this context, all objects are sets, so $Y$ is a set as well.
Assuming this Axiom of Regularity, if $A=\{A\}$, then $A$ is not empty, but its only member is $A$ itself, and $A\cap A=A\neq\varnothing$. So, the Axiom of Regularity shows that this equation cannot have a solution.