ExB and I broke up over a decade ago after a six-year relationship. Our current relationship is that we talk to each other amiably when we meet, but we never get together for coffee or anything like that. We message each other occasionally, usually funny things.
Friday night he messaged me to say he was at the pub with a mutual friend (male) I hadn't seen in years. Then he messaged around 10pm to say he was at a particular pub (where we had all gone to together).
I just so happened to be ten minutes' walk from that pub, as I was on my way home from another event, so I popped in.
Mutual friend was happy to see me. ExB joked (or was it a joke...) I'm a stalker.
I stayed for around half an hour to catch up with them, then left them to continue their drinking, so I didn't take over their meetup.
YABU - ExB telling you his location/companion wasn't an invitation to pop in
YANBU - it was fine for you to pop in and say hi since ExB had given you that information