Sainz reported feeling unwell earlier in the week, which made him sit out his media commitments on Wednesday.
He took part in Thursday's two free practice sessions, setting the seventh-fastest time in the latter, but still reported he couldn't push to the limit in the car after a "tough" 24 hours.
It has now emerged that the 29-year-old Spaniard is struck by appendicitis and will need to undergo surgery, which rules him out for the remainder of the Jeddah weekend.
Ferrari reserve driver Bearman, who was set to start Saturday's F2 feature race from pole, will take over driving duties from Friday's FP3 onwards.
"Carlos Sainz has been diagnosed with appendicitis and will require surgery," Ferrari said.
"As from FP3 and for the rest of this weekend, he will be replaced by reserve driver Oliver Bearman. Oliver will therefore take no further part in this round of the F2 Championship. The Ferrari family wishes Carlos a speedy recovery."
Speaking on Thursday night, Sainz said: "I've had a very rough last 24 hours if I'm honest.
"Of course, preparation will be important. First of all, I have to do a good enough job to make that step one. But I have no doubt that if I get a call-up, I'm ready to go."
As part of F2's sporting regulations, drivers cannot compete in both F1 and F2 on the same grand prix weekend. Prema has therefore decided to withdraw Bearman's pole-winning car.
"While we are sad to withdraw the #3 car that was starting from pole at Jeddah, we are delighted to see Ollie make his F1 debut," Prema stated.