Companies including BT/EE, Tesco Mobile and Vodafone sell phones that cannot be used on other networks unless they have been unlocked, a potentially complex process that can cost about 10 pounds ($13), Ofcom said.
The ban will come into effect in December 2021.
O2, Sky, Three and Virgin Media sell unlocked devices to their customers.
The move is part of a package of measures designed to ensure customers are treated fairly and to make switching easier, Ofcom said.
It said it would consult on proposals to make it easier to switch from fixed-line broadband providers that use Openreach’s copper network to those that use completely separate networks, such as Virgin Media, CityFibre, Gigaclear or Hyperoptic.