A Chinese court ordered Apple Inc. to stop selling older iPhone models after finding the company infringed on two patents held by Qualcomm Inc., the chip maker said, casting uncertainty over Apple’s business in a critical market amid thorny trade relations between the U.S. and China.

The Nov. 30 decision by a Chinese court, which doesn’t apply to new iPhone models launched this year, is the first in the world’s largest smartphone market that seeks to curtail iPhone sales in the country.

Apple...