This is the only mention of golf in Tolkien's writings.
Regarding it being out of place, it's important to remember that this mention of golf is made in the voice of the narrator, not of one of the characters in the story. The narrator is very specifically addressing a modern audience (and an audience of children, at that), and so there are other similar anachronisms throughout the Hobbit (we had a recent similar question relating to guns in Middle-earth, for example).
Tolkien deals with this in his own Letter 215:
When I published The Hobbit – hurriedly and without due consideration – I was still influenced by the convention that 'fairy-stories' are naturally directed to children (with or without the silly added waggery 'from seven to seventy'). And I had children of my own. But the desire to address children, as such, had nothing to do with the story as such in itself or the urge to write it. But it had some unfortunate effects on the mode of expression and narrative method, which if I had not been rushed, I should have corrected.
What all of this means is that one should not assume that mention of anything in the voice of the narrator reflects in any way on what may or may not actually exist in Middle-earth.
Letter 194 emphasises this point:
...the narrator might occasionally venture an interpretation of more than mere plot-events...
And there are other examples throughout Tolkien's letters where he distinguishes the narrator from events or characters in his story.
Although none of these have specific reference to the game of golf, in this case the narrator can be safely assumed to be merely telling a joke to amuse his audience, and nothing more.