Diophantine problems in rings and algebras: undecidability and reductions to rings of algebraic integers