In a wide-ranging speech on foreign policy to US military cadets at West Point, Obama said that the United States should shun isolationism and that its military must be prepared for crises.
"Regional aggression that goes unchecked -- whether it's southern Ukraine, or the South China Sea, or anywhere else in the world -- will ultimately impact our allies, and could draw in our military," Obama said.
But Obama emphasised caution on any decision to use force and said: "American influence is always stronger when we lead by example."
"That's not leadership; that's retreat. That's not strength; that's weakness," Obama said.
More From This Section
Senators of the rival Republican Party have refused to ratify the treaty, saying that the UN convention would override US sovereignty.
Tensions have been rising for months between China and its neighbors at sea, with Vietnam on Tuesday accusing Beijing of ramming and sinking one of its fishing boats in the South China Sea.