Preflop
CO only has 13BB left and puts in 3BB preflop. BTN makes the call. I think, this looks like a great spot to isolate CO and look to play a flip with him with some dead money in the pot. So I would 3-bet this to exactly 13BB and then go from there. It would also not be a mistake to simply fold and hope for CO to either go bust or at least dubble up in this hand.
Flop
The issue with just calling preflop is, that CO is like a landmine waiting to explode. He will have a pot sized bet left, and when he jam on the flop, he can often still have almost anything. BTN probably know this, so it creates an awkward situation, where I guess, you kind of have to call with a hand like this, although it certainly does not feel great.
Turn
Other than an A or 8, this was one of the best cards for you, since now you have a real draw. You also still have a pair, so I dont see much point in betting out. A better hand would never fold, and worse hands would rarely call. So check-calling seems fine, even though he is giving you a fairly bad price.
River
Now I would donk shove. I think, he has something after betting big on the turn into a dry side pot, but its also a scary card to him, and he will check back a lot of hands, that would pay you off including the one, he actually had.
Conclusion
I think, your preflop call created a very awkward postflop spot, which is probably not going to be profitable for you in the long run. This time you were able to win a nice side pot against BTN, but you got very lucky here to beat him with a runner-runner. As played you also missed some value on the river by checking to him again.