The past perfect would not be absolutely incorrect there, even if the intended meaning is that she had just come from the golf course when you saw her. But because of its aspectual sense of "achieved completion as of a point in time" the perfect alone is not ideally suited to that meaning, though it could easily be put into service with a small addition:
When I saw Debbie, she had just played a round of golf.
Same tense, but with the addition of "just" to indicate the temporal relationship. The phrase "a round of golf" adds the notion that this activity is telic, one having a defined end. "Playing golf" is not telic but atelic.
If you want to say that she had been engaged in an atelic activity (and to imply nothing more) use the past perfect continuous:
When I saw Debbie, she had been taking guitar lessons for about a year.
The simple past perfect would not be absolutely wrong with an atelic activity, though it does convey the aspect that those lessons had culminated in some way, or perhaps had ended for some reason:
When I saw Debbie, she had taken guitar lessons for about a year
That sentence is slightly off, its door slightly ajar, its focus aspectually "blurry". The perfect opens the door to some kind of end or achievement and so it runs counter to the verb's a-telicity. It partners with such a context: had Debbie decided to quit the guitar? had Debbie been murdered? did she switch to the saxophone? did she join a band? Was she deciding whether to continue? Was she marking a milestone? Was there going to be a concert where students who had been taking lessons for a year would show their progress? Whatever.