Matias Fernandez-Pardo scored in the 19th minute, albeit with a lot of help from Australian shot stopper.
Ryan tried to dribble past Fernandez-Pardo after receiving a routine back pass and ended up getting tackled by him, leading to an open goal for the 20-year-old Belgian winger.
Ryan had earlier kept out a second-minute shot from Fernandez-Pardo after he went clean through.
Lille and Nice both have 47 points with Nice ahead on goal difference. Third-placed Marseille are only two points ahead of them in the race for a Champions League spot, with seven rounds remaining and the top four qualifying.
Earlier on Sunday, Abdoulaye Toure scored two penalties against his former club as Le Havre beat Nantes 3-2 to claim a vital win in their relegation fight.
The 31-year-old was born in Nantes and came through the club's youth academy before playing nearly 150 league games for the club from 2013-21. He scored his penalties either side of a goal for Nantes from Saidou Sow.
Moses Simon made it 2-2 shortly after the break, but defender Timothee Pembele grabbed Le Havre's winner in the 88th minute.
The victory moved Le Havre into 16th place in the 18-team league, with seven rounds left.
Brittany-based Brest withstood a comeback before winning 4-2 at Toulouse.
Elsewhere, Rennes won 3-0 at lowly Angers to move closer to mid-table security.
Auxerre scored a 1-0 win against rock-bottom Montpellier, which edged them closed toward relegation after a seventh straight defeat.
Unbeaten Paris Saint-Germain moved within touching distance of a record-extending 13th league title after overwhelming Saint-Etienne 6-1 on Saturday.
PSG only need a draw at home to Angers next weekend to seal the deal.