Answering somebody else's phone prevents the incoming call from going to voice mail, which could be inconvenient or disruptive for the person the call was intended for. And depending on the situation, answering somebody else's phone might be considered an invasion of privacy.
If a coworker is away for a while and the ringing of his/her phone is a distraction, then you might consider lifting the receiver. Do this only if doing so causes incoming calls to go directly to voice mail -- which is what it should be doing while the person is absent anyway. Be sure that's what it does before you do anything (for example, test it with your own phone first). If you do this, leave the receiver in a position that will be obvious, so your coworker can hang up the phone again when he/she returns.
If lifting the receiver doesn't cause incoming calls to go to voice mail, then you'll need to find another solution. If it's really a significant problem, talk to your manager. Among other things, discuss encouraging everyone to turn down their ringer volume and to reconfigure their phones so they don't ring while they're away for an extended period of time.
I wouldn't mess with the phone (changing settings, etc.) beyond possibly lifting the receiver.
(Peripherally relevant anecdote: At a previous job, a coworker left on vacation with a mobile phone locked in a drawer. The alarm went off at the same time every day.)