An Egyptian court has ordered the release of one of the Islamic militants convicted in connection with the 1981 assassination of President Anwar Sadat, saying he had completed his sentence.