In my experience, rubber or rubber like components of a bike are better changed when bringing an "old" bike back to use condition.
Inner tubes degrade and become porous and prone to "spontaneous" puncture. Rim brake pads become hard or brittle and do not stop the bike adequately. Both of these are a safety concern.
I know this is subjective, but in my opinion, it is better to replace the tubes as they are cheap in most places. In any case, it is worth dismounting the tires and inspecting the inner, the tube and the rim tape, and make sure there are no foreign objects or anything that can cause a puncture.
Brake pads, on the other hand, are definitively not the part to skimp on (in case you have old ones still on the bike - and yes, I'm assuming you have rim brakes; I have never had an issue with disk brake pads due to age alone).
-- End of answer and beginning of anecdote --
I learned about those in an event where fortunately there was no consequence for me other than a scare.
I decided to ride a very old road bike down a steep and long road. I had tested the brakes on the flat and they seemed okay. The tubes held air just fine so I thought there was no high risk.
Turns out the dried brake pads had almost no power when in the downward slope and I had to squeeze the levers hard and continuously just in order to avoid overspeed, In fact, I could not bring the bike to a stop. Near the bottom of the hill, both tubes "exploded" due to rim heating (I guess). They both produced a "bang" sound similar to small fire crackers losing all air instantaneously.
Luckily they did not burst at the exact same time but one after the other and over a straight stretch of road, and also, there was very little traffic on that road at that particular time. I managed to keep control and could stop as I reached a level part of the road. I touched the rims and they where hot enough that I could not keep my fingers against them for long. When I got to evaluate the tubes they both had long gashes.
Tires are somewhat more forgiving and also can be more easily inspected, but they also become harder and thus they lose traction more easily. In the case of flat handlebars, grips may become also hard and thus less comfortable to use, or the opposite, they become a sticky goo, but, unless they are slipping off the handlebar, they aren't much of a safety concern.
Bottom line: If you are on a tight budget it is understandable to try and keep as much of the bike as possible, but seek to replace critical items as soon as possible as an accident can easily result in way more expense. If the bike is going to have commuter use, then a puncture or tube failure can result in being late for an appointment.