Yes you heard it right. When someone asks if you have something on you it is the same meaning as asking if you have something with you. When saying on you it means you are talking about something small enough to be carried on your person.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
"Do you have a pen on you?" is poor English. It's an informal attempt at communication, and while we understand what is meant, it's not well said. "What are you gonna do?" is also a question understood, but poor English. Better to ask "Do you have a pen?" or "Do you have a pen I may borrow?".