It’s completely fair to ask a favour of an old friend, I’ve both asked and been asked of favours from people I haven’t spoken to in years. However, I think you should be upfront about it, and not act like you’re trying to get in touch for other reasons. Something like “Hey, it’s been a while, but I just came across XYZ and wondered if you could give me a hand?” is completely fine IMO.
It’s completely fair to ask a favour of an old friend, I’ve both asked and been asked of favours from people I haven’t spoken to in years. However, I think you should be upfront about it, and not act like you’re trying to get in touch for other reasons. Something like “Hey, it’s been a while, but I just came across XYZ and wondered if you could give me a hand?” is completely fine IMO.