The 33-year-old withdrew shortly before she was due to face fellow American Christina McHale in round three.
But the 19-time Grand Slam champion does not think the injury - which is affecting her serve - will be an issue at the French Open, which begins on Sunday, 24 May.
Williams was the defending champion in Rome.
Britain's world number three Andy Murray has pulled out of the men's event, citing fatigue.
Andy Murray has pulled out of the Italian Open in Rome, citing fatigue.
The Briton was due to play David Goffin in the third round on Thursday after a run of 10 successive victories on clay.
The 27-year-old third seed, who had considered skipping the tournament to rest for the French Open, beat Jeremy Chardy 6-4 6-3 in the previous round.
"I've played so much over the past 14 days. I've played 10 matches with some extremely late finishes and my body needs to rest," Murray told BBC Sport.
Elsewhere in the draw, Roger Federer survived a late fightback by Kevin Anderson to win 6-3 7-5 and book his place in the quarter-finals.
If the Swiss beats Czech Tomas Berdych, who overcame local hope Fabio Fognini 6-3 3-6 7-6 (7-2), he could play Rafael Nadal in the semi-final.
The Spaniard reached the last eight with a 6-4 6-4 win over American John Isner and will now meet Swiss Stan Wawrinka on Friday.
Reigning champion Novak Djokovic came from behind to beat Brazilian Thomaz Bellucci 5-7 6-2 6-3.
The world number one next plays Kei Nishikori, who overcame Viktor Troicki 6-4 6-3.
Murray's victory over Frenchman Chardy followed back-to-back tournament victories in Munich and Madrid, where he defeated Rafael Nadal for the first time on clay in the final.