It doesn't matter if its an instructor or not.
You cannot be PIC with anyone else onboard if outside 90 days unless you are an instructor yourself (and there are a heap of technical issues you need to make sure about before thats even legal) It basically has to be a training flight with all the restrictions that they have. And the other person is counted as Flight crew not pax. And you can't have anyone else onboard eg 2 pax in the back on a trial flight.
If the instructor is PIC and legal and you are DUAL everything is fine.