Syria's government and rebels have reached a deal under which opposition fighters holed up in besieged parts of Homs city will withdraw during a ceasefire, an NGO said on Friday.