The duo both picked up groin injuries in Saturday's 1-1 draw with Aldershot. Winger Ainsworth is expected to miss just the cup tie, but defender O'Donnell is suspected to have picked up a hernia, which would keep him out for longer.
O'Donnell's likely extended absence means that Shane Cansdell-Sheriff will get a chance to impress manager Graham Turner.
Midfielder Kevin McIntyre will be available after completing a three-match ban, but striker Matt Harrold is unavailable as he serves a one-game suspension for his red card against the Shots.
Kris Bright could return to the squad after his recovery from illness though fellow striker Nathan Elder (knee) remains a long-term injury victim with knee ligament damage.