Can I visit a former professor during office hours?

I see nothing wrong with visiting a former professor. I would send an email asking if office hours are best or should a different time be scheduled.

My D has also gone for coffee etc with past professors and still remains in touch.