You have to fold preflop here. However, now that you didn't, you may have gotten really unlucky on the river (if he has A9), really unlucky on the flop (if villain made a set), or you were beat the whole time (pocket pair over 10). So, now that you know you likely don't have the best hand (you still might), you have to determine a couple of things.
1. If you check and you somehow do have the best hand (i.e. the villain missed a draw), do you think they'll bluff? Since the player is unknown, it's hard to say, and if they sense that you're weak, it wouldn't be a bad spot for them.
2. If you check, how much are you willing to call? Even if you don't think that you have the best hand, given the right odds, your hand is still good enough for a call, as they could think they're value betting when they bet with 88 or thereabouts.
3. If you bet, how much are you willing to call if he goes over the top? If they had a hand like A9 (its very unlikely that they'd reraise here, but players do weird things), then they're raising here. Also, if they were slowplaying a set, they're raising here. However, they could also try to raise and steal with pot if they have some weird hand like 78 suited or pocket 8s, figuring that the river 9 could be a scare card (if they're read is that you aren't holding a 9 or a full house).
4. Are there any hands that you are losing to that would fold if you bet out on the river? This is the main thing you need to decide when decided if you want to bet or check. If you bet out about half the pot, do you think the villain will fold JJ-AA? If so, it could be a good spot for a bet This is up to you to figure out. I've seen much worse calls than someone calling with a paired board with JJ, but I've also seen much stranger folds than someone mucking AA here.
5. Will any hand that you have beat call if you bet? My guess is no. Now, if the answer to #4 is that someone with JJ-AA will fold, then betting is okay. If they answer to 4 is that they won't (and assuming you agree with me that no inferior hand will call your bet), then there is no way you should be.
My final analysis: Just check. If they want to make a huge bluff with 88, then you might bet bluffed off the best hand. However, if they make a small bet and give you 3-1 or better to call, I'd pay them to flip over their hand, as there are many players who are simply too scared to make a big bluff.