TikTok is to be banned in the US from Sunday if it is not sold by its Chinese parent company, the Supreme Court has ruled.