A's manager Bob Melvin said after the game that he doesn't know whether Anderson will be able to make his next start.
"We'll know more tomorrow," Melvin said. "I really won't know until then."
Anderson wasn't sure how the injury occurred.
"I don't know if I just landed on it wrong or what," said Anderson, who was treated to a 2-0 lead in the top half of the first inning but left the game trailing 4-2. "I know when I landed, it didn't feel great. Then when I came into the dugout it started to stiffen up."
Both Anderson and Melvin thought he pitched better than the scoreboard indicated.
"I thought he was a little more aggressive today," the A's manager said.
"My stuff actually wasn't too bad," said Anderson, who yielded four runs on four hits with two walks before he was forced to leave the game. "Now we'll have to go back to the drawing board."
Friday's loss, before a Tropicana Field crowd of 15,115, snapped the hot-hitting A's latest winning streak at three. It was just their third loss in their last 15 games.
The A's threatened to make things interesting when they loaded the bases with nobody out in the ninth inning, before Tampa Bay closer Fernando Rodney got the final three outs.
"You always want to keep grinding -- that's kind of who we are and who we want to be," Melvin said. "Not go down quietly."
Tampa Bay's Evan Longoria belted his fourth home run of the season and Ben Zobrist and Jose Lobaton also knocked in two runs apiece for the Rays, as the A's lost on the road for the first time this season. The A's are 0-5 when scoring fewer than four runs
The Rays' Alex Cobb (2-1), who departed to a standing ovation with one out in the eighth, is now 9-2 over his last 13 starts and 3-1 in four career starts against the A's.
The A's jumped out to a 2-0 first-inning lead, thanks to RBI singles by Jed Lowrie and Brandon Moss after Coco Crisp began the game with a double, extending his Major League-leading hitting streak to 12 games.
"He's been about as consistent as you can be," Melvin said of Lowrie, who matched a career high by going 4-for-4 on Friday and is now batting .413. "Right-handers, left-handers, it doesn't seem to make any difference."
Lowrie entered the game hitting .151 for this career against the Rays, his lowest mark against any American League team.
The Rays responded with four runs of their own in the bottom half of the first inning, batting around against Anderson, who was facing the Rays for the first time since August 2010.
Crisp, who owns a .455 career average against Cobb, homered in the seventh, his fifth home run and 13th extra-base hit of the year. Last year, Crisp didn't hit his fifth homer until July 25.