We have a small closet in a spare room that we'd like to be able to lock with a key. It has a small, non-standard doorknob. I thought of using a hasp with a padlock, but that's ugly and more security than we actually need. Will I need to upgrade to a full-size doorknob, or is there another solution?
I can't tell what the existing backset (distance from front-side edge of door to center of knob shaft) is, but you can buy mortise locksets that lock. A bit of chisel work would expand the existing mortise.
I shudder to offer this link, but as an example of widely available things, mortise lockset
The linked one appears to have a 2-1/2" backset.
I'd suggest an architectural scrap yard, except that their locksets don't always come with keys...
One other solution is to "simply" add a lock, ignoring the details of the current doorknob.
The padlock is actually dubious or an actual code violation, and the lock you choose to add should be releasable from inside the closet (which is why that's probably a code violation - locking people in closets is not safe.) It may be a "not uncommon" violation but I'm pretty sure it is one, these days, most places.