An alleged “patsy” accused of having an assault rifle and ammunition belonging to the New IRA in Derry is to be released from custody, a High Court judge has ruled.