The 29-year-old Ghana forward spent last season on loan at Fenerbahce and had been expected to leave the Liberty Stadium this summer.
But he remains a Swans player for now and could face the Cobblers having returned to training on Sunday.
“He has come back really fit,” said head coach Steve Cooper.
“Like everybody he is in the mix. He could end up being a really good option for us going forward.”
Ayew joined Swansea for a second spell in a club-record £18m deal in January 2018, but was unable to prevent relegation from the Premier League.
His most recent Swans appearance was in their last top-flight game, a 2-1 defeat to Stoke in May 2018.
Ayew could yet depart in the next few weeks with a number of overseas transfer windows still open.
Swansea, meanwhile, are hopeful that Aldo Kalulu did not suffer a serious injury in last Saturday’s goalless draw at Derby.
-BBC