In Season 6, Episode 24 of TNG, Second Chances, Riker is playing a trombone, but who is the real trombonist?
If this clip is the clip that you are thinking of:
Frakes likes to talk about trombone playing, something he has done since he marched with the band at Penn State University. He played it on Star Trek: The Next Generation, but was often dubbed by someone else onscreen. "When Riker played badly, it was me, but when he was playing well, it was Bill Watrous," confesses Frakes. "My kid still thinks I'm good, though. He recognizes Star Trek when it's on, that's Daddy's show."
It is definitely overdubbed. It is obvious that Frakes does actually play the trombone, because the technique he uses to hold the instrument is correct. The velocity that he moves the slide is appropriate too. However, the positions he uses are not correct for the pitches that are actually being played. Further, there are several times where the audio has very wide slide vibrato and yet the visual has the slide kept immobile.
While this does not prove who the trombonist is, we can be reasonably assured that it is not Frakes playing trombone. For comparison, here are several clips of him playing trombone:
The tone quality is vastly different than in the clip in question, and while he's actually a decent player, is is different enough that in the case of the latter, it is Frakes playing, and in the former, someone who is a hardened professional doing the playing. If it were another professional it would be more difficult to tell who it was, but Bill has an exceedingly unique style of playing and timbre that is basically impossible to replicate without years and years of dedicated practicing.
For comparison, here are some clips of Bill Watrous, you can compare the above tone quality with several clips above. It should become abundantly clear this is the artist overdubbing that particular scene:
Given the words of Frakes, there are two options: It can be him playing, or it can be Bill Watrous. Because of the tone quality and manner of playing, it must be Watrous.
As an aside, he appears to be playing a King 2B, 2B+, or "Jiggs" 2B trombone, which can be ascertained by some of the design features of the instrument, which include a King style bent lower bell brace and the smaller 7 3/8" bell diameter.
Quite possibly Jonathan Frakes himself:
Also, from this interview:
I told [Roddenberry] about the trombone and the jazz, and then all of a sudden the character started to have a few of the qualities that I could relate to personally.
So the fact that Riker plays the trombone is because Frakes plays it.