The app’s owner, ByteDance, has nine months to sell its stake or face being blocked in the US.