The three players helped the Minstermen secure a return to the National League, as they defeated Boston United in the National League North promotion final last weekend.
Hancox was on loan from Hereford, while John-Lewis was on a temporary stay in North Yorkshire from Grimsby Town. Sanders had spent the season at York on a loan from Championship side Nottingham Forest.
York confirmed the trio had been offered the chance to remain at the club permanently, as they announced their retained list following their promotion.
Nine other players have been offered new deals while two players have been invited back for the club's pre-season.
The club has released 14 players, including the likes of Clayton Donaldson. A York statement read: "We would like to place on record our gratitude to the departing players who were all part of our promotion winning campaign and who leave with our very best wishes for the future."
York City's retained list in full
Offered a new deal: Scott Barrow, Olly Dyson, Jonny Haase, Pete Jameson, Maz Kouhyar, Maxim Kouogun, Paddy McLaughlin, Ryan Whitley, Akil Wright.
Invited back to pre-season: Michael Duckworth, Michael Woods.
Released: Matty Brown, Maison Campbell, Lewis Cunningham, Clayton Donaldson, Jack Degruchy, Mackenzie Heaney, Luke Jones, Josh King, Remy Longdon, Jack McKay, Sean Newton, Reon Potts, Archie Whitfield, Kurt Willoughby.