I'm wondering when Bezout's Theorem is valid.
I know when the ring $R$ is a Euclidean Domain or a Principal Ideal Domain there is always $\gcd(a,b)$ and I can find $x,y \in R$ such that $\gcd(a,b) = ax + by.$
I know when the ring $R$ is a Unique Factorization Domain, there is always $\gcd(a,b)$. My question is, in this case can I find $x,y \in R$ such that $\gcd(a,b) = ax + by.$ ?
Now if $R$ is just a commutative ring, if there is $d \in R$ such that $\langle a\rangle+\langle b\rangle = \langle d\rangle $ I know that $d = \gcd(a,b)$. In this case, can I find $x,y \in R$ such that $\gcd(a,b) = ax + by$ ?
It is not necessarily true in a UFD. For instance, if $k$ is a field, then the polynomial ring $k[s,t]$ is a UFD. But $\gcd(s,t)=1$, and there do not exist $x$ and $y$ such that $sx+ty=1$.
For your second question, the answer is yes by definition. Indeed, by definition, $\langle a\rangle+\langle b\rangle$ is the set of elements of the form $ax+by$. So if $d\in \langle a\rangle+\langle b\rangle$, then there exist $x,y\in R$ such that $d=ax+by$.
The converse holds as well: if $d=\gcd(a,b)$ can be written in the form $ax+by$, then that means $d\in \langle a\rangle+\langle b\rangle$, and it follows that $\langle a\rangle+\langle b\rangle=\langle d\rangle$.
Thus a commutative ring has the property that the GCD of any two elements $a$ and $b$ can be written in the form $ax+by$ iff the sum of any two principal ideals is principal. By induction on the number of generators, this is equivalent to any finitely generated ideal being principal. Such a ring is known as a Bezout ring. A Noetherian Bezout ring is the same thing as a principal ideal ring, but there exist non-Noetherian examples as well. For instance, the ring of holomorphic functions on a connected open subset of $\mathbb{C}$ is a Bezout domain but has ideals which are not finitely generated.