That is a well established step one for nicking someone's bike...
You've at least two good alternatives, depending on how nefarious you think it is and how tough their lock is:
1. lock their bike up as well as yours, put a note on it saying you're nearby (even if you're not) and asking them to call your mobile to be unlocked;
2. bust their lock. If their bike gets nicked before they return, it's their own silly fault for not locking it up properly. If you want to be really kind, lock their bike up with your lock and put a note on it asking them to call your mobile to be unlocked. If it's somewhere with a reception desk or gate or similar, ask if they'll keep the key, do the unlock and keep the lock until you can collect it.
Part of the reason why I tend to put my bikes on their prop stand, rather than leaning against a parking rack is it reduces the chance of someone accidentally going around my frame as well as the rack.
(edited to remove quotes from accidentally - what was I thinking?

)