The US President-elect Donald J. Trump is considering an executive order to allow TikTok to continue operating despite a pending legal ban until new owners are found, according to a person with knowledge of the matter.