Defense Secretary Robert M. Gates cautioned that China could risk losing gains in Asia’s economic prosperity if it bullied its neighbors over natural resources in contested areas.