Mayor Michael R. Bloomberg set up his first major confrontation with Gov. Andrew M. Cuomo on Sunday, publicly demanding that he use his coming state budget to reverse a rule that protects long-serving teachers from layoffs, regardless of merit.