Seeing that you can't just simply ask him to hang out, I assume that you are not very close to him even though you've known him for a long time. But have no fear, you could use knowing him for about ten years to your advantage!
I would first start out with a simple conversation about the past. This should somehow relate to the present though so your "random" conversation should have some context. For instance, you may have learned a little ecology in elementary school and now that you're in high school, you may learn ecology more in depth. So what you do is tie some events back in elementary school ecology to the ecology you are learning about now and talk about that with him. Therefore it starts out a conversation that and you can hopefully grow closer through common events.
Once you start to know each other better and get closer, then you can also casually say "hey, some friends and I are hanging out, you want to come?" and those friends should either be mutual friends or people who he has also known for a long time too. While hanging out, hopefully you can know each other even better and grow even closer. After you guys have gotten to a more personal and close level, you can soon casually invite him for coffee like you would a regular friend.
I've done this before with a guy who I had known since we were 10. We were pretty okay friends back then but then when we were in middle and high school, we grew apart. We still knew a lot of people from back when we were 10 and we had tons of mutual friends. So during my senior year of high school, getting to know him again wasn't so difficult. Although it didn't amount to anything more than friends, I was able to regain a good friend during my last year of high school. Speaking of which, I haven't spoken to him in a while and should probably contact him again to at least say hi.
Anyway, I hope this helps at least give you an idea on what you can do. The details are up to you of course but I'm sure that you'll be able to manage :) Good luck!