Yes, a GFCI breaker can protect the feeder going to a subpanel. The GFCI protects whatever is downstream of it; when that happens to be a subpanel then all the circuits in that panel are protected.
I used this technique in my detached shop building. There are two panels in the building. The first holds a 20 amp GFCI breaker to service the lights inside the building (they're mounted to the ceiling, but they're cord-and-plug connected, so GFCI is required) and it also holds a 50 amp two-pole GFCI breaker. This latter breaker feeds the second panel. The second panel holds a variety of circuits: one 30 A/240 V each for the welder/plasma cutter, air compressor, and metal brake; a few 20 A/120 V for receptacles in various places. I was able to use normal inexpensive breakers for all those circuits because they're receiving GFCI protection from upstream.
There are some drawbacks:
- 50 A is the largest GFCI breaker I could find. It seems a bit low but the reality is the max simultaneous draw on it will never really approach 50 A. If that ever changes there's room in the upstream panel to move any high-draw circuit to a new breaker in that panel.
- When there is a GFCI trip due to an extension cord left lying outdoors when a rain storm comes along all my receptacles go out. That's been an annoyance a few times now; "one of these days" I'll do something about it. The solution will probably be a separate GFCI circuit from the upstream panel to feed those receptacles most likely to have a GFCI trip (the ones on the exterior of the building).