Instabilities of magnetic flux tubes in a stellar convection zone I. Equatorial flux rings in differentially rotating stars