In a victory for opponents of the drilling process known as hydrofracking, a New York State judge ruled on Tuesday that the upstate town of Dryden in Tompkins County can ban natural gas drilling within its boundaries.