SYDNEY—Apple Inc. was fined in Australia for refusing to offer free fixes for iPhones and iPads that were previously serviced by non-Apple stores, the latest episode in a global dispute between companies and consumers about the right to repair.

A court ordered Apple AAPL, +1.91% to pay a penalty of 9 million Australian dollars ($6.7 million), after it told consumers it wouldn’t offer free repairs for devices that had become inoperable due to a glitch known as “Error 53.” The fault had occurred after consumers downloaded an update to Apple’s operating system.