Short answer: he is betting money. Specifically, the Federation Credit.
The Star Trek franchise has been running for decades, there are hundreds of episodes written by scores of writers. There are a huge number of inconsistencies from one episode to the next. Concepts that are introduced in one episode are frequently changed, ignored of forgotten about in another. A lot depends on the plot requirements of a particular story.
The makers of the show have never worked out a detailed and consistent plan of how the future economy works. Not surprising, really. That would be almost impossible. The details of the future economy are left vague, and any details given change from episode to episode.
In The Neutral Zone Picard tells the revived rich guy that money no longer exists. That was a detail necessary for that particular story. Other stories explicitly contradict this. There are many stories where people are buying things for money, or losing money on business. All the poker scenes indicate that they are risking something valuable. For every statement that the federation doesn't use money, there are at least twenty explicit examples of using money. Worf's reference to a betting pool is one of these.
It is a post scarcity society, and everyone has sufficient to live on. That doesn't mean that everything is free.
Where was it ever said that Starfleet officers aren't paid?