The Newcastle United striker is one of six Senegal regulars to pull out.
Ba played all 90 minutes against West Ham on Sunday, while four of the other absentees are members of French clubs - Lamine Sane (Bordeaux), Cheikh Mbengue (Toulouse), Pape Ndiaye Souare (Stade Reims) and Idrissa Gana Gueye (Lille).
Ba did not appear to be suffering from any injury when he walked off the pitch at St James Park at the weekend.
Qatar-based Issiar Dia has also withdrawn from the match in Niamey.
Senegal missed out on African Nations Cup qualification last month when they were disqualified following their match against the Ivory Coast in Dakar which was abandoned because of crowd violence.