Pocket doors only "lock" from the inside. You have to turn the handle to engage the lock.
Ours often gets stuck. I believe (from the outside), if you lift and slide, you can disengage it from the wall hook. To avoid same issue arising in the future, always be sure the locking knob is seated inside the door panel before pulling it closed (or not close it all the way

)