Carlos Hyde averaged 2.6 yards on 21 carries Sunday, and there might be a reason for that: his left foot.

The 49ers’ running back was questionable with a foot injury he suffered the previous Sunday against the Giants, and he played through the discomfort in a 25-20 win over the Ravens. The extent of Hyde’s foot issue became obvious when he took a handoff, made a cut and dropped to the ground 2 yards beyond the line of scrimmage early in the third quarter.

Hyde returned on the same drive, but had 9 yards on his final eight carries after dropping to the ground.

“I just put too much pressure, too much weight on it,” Hyde said. “It hurts when I put too much weight on it. … It just shocked me how bad it hurt when I tried to put too much weight on it and I just went down.”

Hyde won’t have the luxury of getting much rest. The 49ers will host Seattle on Thursday night, but Hyde insisted he’ll be ready.

“Oh yeah, definitely,” he said. “Division game. Definitely.”

Brooks is back: After missing a 30-27 loss to the Giants following the death of his sister, outside linebacker Ahmad Brooks returned and had three tackles and a pass breakup.

Brooks acknowledged that his time away from the team took its toll during the game. Brooks, 31, returned to practice Wednesday after more than a week away.

“I took a week off, and I felt the effect of it today,” he said. “I started to cramp up in the second half, but I made it through.”

Brooks sister, Krsunthia, 40, died of lupus.

“She was one of my biggest supporters from the time I was a little boy,” Brooks said. “She would want me to play this game. I wanted to play.”

Last-play chaos: Before Baltimore quarterback Joe Flacco’s 35-yard heave fell incomplete as time expired, the 49ers appeared confused on defense.

On the sideline, defensive tackle Tony Jerod-Eddie beckoned nose tackle Ian Williams to come off the field so he could replace him, but Williams waved him off.

Was Jerod-Eddie supposed to be on the field?

“That was the plan,” he said, “but it worked out.”

Meanwhile, safety Antoine Bethea ran off the field, briefly stayed on the sideline and ran back on before the final snap. The reason: The 49ers initially had 12 men on the field. They had been penalized for having 12 men on the field one play earlier.

“Antoine made a really smart move,” safety Eric Reid said. “We had too many people on the field again, so he ran off and stood on the sideline until we got everything situated.”

Injury report: Reid appeared to take a blow to the ribs in the fourth quarter when he tackled wide receiver Steve Smith at the end of a 12-yard reception. Reid returned to the game but was clearly in pain as he spoke to reporters in the locker room.

Head coach Jim Tomsula said Reid “had the wind knocked out of him.”

This and that: Tight end Vernon Davis returned after missing two games with a knee injury but didn’t have a reception and was targeted with one pass. Davis has 30 catches, 310 yards and no touchdowns in his past 17 games. … The 49ers had three players register at least 85 receiving yards in a game for the first time since Nov. 28, 1982. The trio: Anquan Boldin (102 yards), Torrey Smith (96) and Bruce Miller (89).

Eric Branch is a San Francisco Chronicle staff writer.