what a great question. and a very interesting one. the correct answer may depend on where you live and how the laws are applied there.
first, if you were planning on joining a pool session run by a local dive shop, but not paying for the help of an instructor, i would assume the shop would not allow this. i certainly wouldn't.
second, if you were going to rent your own private pool space, and no one else was there but yourself and your two possible dive buddies, then perhaps that would be ok ?? or would it ??
third, if you ever held any pro certification at any time in the past, but are currently not active (and have no insurance) i would not do it. i know i wouldn't. the only exception for me would be if it was my spouse i was helping.
fourth, perhaps the newer diver might be able to get by with only a refresher. but the one who was certified 20 years ago should probably consider redoing the whole course.
here is a long example that may or may not help you decide:
i went on vacation a few years back with my spouse and my brother. i was an active instructor at the time. my spouse also dives. but my brother had not been diving in many years.
i had pleaded with him to get a proper refresher before the trip (he lives in a different city than i do). he chose not to.
once we met on holiday, we all decided to do a couple of easy/shallow shore dives together. other than a few really basic tasks i helped him with (like putting the gear together) he would not let me run him through even the most basic drills (mask clear / reg clear etc). we are men right? so we don't need any help from anyone. lol
the first daytime shore dive was fine. we also did a night dive there as well. he really enjoyed that one. but him and i did become briefly separated on the day dive and he ended up at the surface. that was my first warning.
he decided he wanted to do a double tank reef dive. we booked the easy afternoon boat. schedule got screwed up and we were not on that boat. our only other option was the next morning. i did not realize they put us on the advanced small boat instead of the larger slow boat. this was my second warning.
that morning the boat arrived early for some reason and we almost missed it. no it was not our fault at all. but it caused us to have to rush to get everything on board etc. we were also delayed because the shop gave me the wrong tanks i had pre booked (i was diving sm). so the whole process had my brother very agitated and obviously frustrated. warning number three.
at the first dive site we entered the water together and began the decent. he lost control and was descending too quickly, he panicked, and bolted to the surface from about 30 feet.
i slowly ascended and asked how i could help. he was beyond help and had to stay with the boat. i descended solo, caught up to the guide and buddied with him.
my brother somehow convinced the boat captain to drag him (while he was still in the water) over top of our group. he then descended solo and appeared out of nowhere to my surprise. he seemed ok. i had him hold my waist d-ring to avoid getting separated.
everything seemed fine until he suddenly, without warning, let go and again bolted to the surface from what was probably 60 feet or so.
we could see he made the surface and the boat immediately came to him so we completed the dive.
needless to say, he did not even attempt the second dive.
so what is my point?
no matter what the law might say, do you really want to take any type of responsibility for either of those two divers?
yes, a certified diver is, and should be, responsible for their own decisions. but does the more seasoned diver (even if they are not a professional) not have at least some type of moral/ethic responsibility when agreeing to dive with another certified diver that is clearly not ready to be back in the water?
i think what we can do to help protect each other is to make sure that divers in this situation at the very least get some guidance from a trained dive pro before jumping back in the water after being away from the sport.
if they refuse to do so, maybe the best thing we could do to help them (and protect ourselves) is to say "no. i won't dive with you".
just fyi.....i have been diving over 30 years and was a pro level diver for about the last 10 years, and i never go diving on vacation without getting in the pool with my spouse first to check our gear, and run us both through the basics.
my story could have turned out quite badly. i won't put myself or another diver in that situation again if it can be avoided.