Midfielder O'Toole, 28, is out of contract with the Cobblers at the end of the season and was part of the side that won the League Two title in 2016.
He missed the 0-0 draw with Oxford on 25 March and was substituted in Saturday's 1-1 draw at Rochdale.
"It may [require surgery]," Edinburgh told BBC Radio Northampton. "But we're hopeful it doesn't."
It's something that won't clear up between now and the end of the season
Edinburgh continued: "We just have to get John-Joe to take part in as many games as we can."
Former Bristol Rovers player O'Toole has scored 12 goals in all competitions this season, including seven in his past 11 games.
However, 23-year-old loan forward Luke Williams (hamstring) will be fit for Saturday's meeting with League One leaders Sheffield United at Sixfields, while striker Alex Revell, 33, could also return against the Blades following a calf injury.
The Cobblers are 15th in the table, eight points clear of the relegation zone with five games to play.
Northampton Town manager Justin Edinburgh says John-Joe O'Toole may require surgery on a groin injury.