The RS CVn binary XY UMa as a member of a triple system