I haven't flown in 20 years. My medical certificate is not up to date. Can I log a fam flight with a local instructor?
To answer your question, specific to the US, you may log your fam flight with a CFI as dual received, and also as PIC for the time you are the sole manipulator of the controls (which will likely be the entire flight).
You don't need a medical to log PIC, but you will likely need one to act as PIC, depending upon what you are flying.
But for training, you clearly can log time as PIC when you are the sole manipulator of the controls, in a class and category for which you are rated.
Depending on jurisdiction and aircraft you might be able to. The FAA's recent third class medical reform may allow you to fly if your medical stretched into the last decade
Under the reforms, pilots who have held a valid medical certificate any time in the decade prior to July 15, 2016, may not need to take another FAA medical exam. The 10-year lookback period applies to both regular and special issuance medicals.
and long as your biannual is current and you did not lose your medical for a medical reason (lapsing is not considered a loss). All that being said you can log PIC time if you comply with the above listed things. You will need at least a biannual review so instructor time will have to happen. If you have not flown in 20 years some training is well worth your time before brining any passengers along.