Downing Street has said it was right for a freed British-Egyptian activist to apologise following the discovery of "abhorrent" social media posts.