The prime minister, Malcolm Turnbull, has used a key speech on security in Singapore to warn against “a coercive China”, saying such a move would find its neighbours becoming resentful and looking for alliances elsewhere.

Pointing to “now palpable tensions” on the Korean peninsula and in the South China Sea, Turnbull used his keynote address at the Shangri La security summit on Friday night to send a clear message – that while countries like Australia and Singapore might be “smaller fish”, they value their sovereignty.

Going straight to the heart of rising concerns over the contested waters, Turnbull said: “Maintaining the rule of law in our region, respecting the sovereignty of nations large and small is the key to continued peace and stability.”

The rapid rise of a new power creates anxiety and China’s rise had become the “topic of most intense debate”, he added.

China would best succeed, he said, by respecting the sovereignty of others and building on trust and cooperation.

“A coercive China would find its neighbours resenting demands they cede their autonomy and strategic space, and look to counterweight Beijing’s power by bolstering alliances and partnerships, between themselves and especially with the United States.”

But while some commentators argue Australia must choose between Beijing and Washington, Turnbull was keen to stress Australia has a friend and partner in both.

“Our alliance with the United States reflects a deep alignment of interests and values but it has never been a straightjacket for Australian policy-making.”

Amid rising concern in the region of America’s unpredictable foreign policy, Turnbull said while the US withdrawal from the Trans-Pacific Partnership trade deal and now from the Paris climate change agreement was “disappointing ... we should take care not to rush to interpret an intent to engage on different terms as one not to engage at all”.

His comments come after the veteran US senator John McCain this week in Sydney suggested Australia consider joining patrols of the South China Sea.

Pointing to the construction of artificial islands and militarisation of the sea – which is a vital trade route for Australia – McCain said “as China has grown wealthier and stronger, it seems to be acting more and more like a bully”.

Earlier on Friday, Turnbull met with Singapore’s prime minister, Lee Hsien Long, talking up the friendship between two countries and touching on the threat of terrorism.

Referring to the ongoing battle in the southern city of Marawi in the Philippines between Isis-linked terrorists and government forces, Turnbull said the threat of returning foreign fighters was a “very real one” in the region.

“With the bitter memory of the 2002 Bali bombing, I am keenly alert to the risk that the next mass casualty attack on Australian victims could well be somewhere in south-east Asia, where Isil propaganda has galvanised existing networks of extremists and attracted new recruits,” Turnbull said on Friday.