Firstly, make sure there isn't an underlying issue that makes the horse want to avoid that kind of work. Discomfort from badly-fitted tack, an undiagnosed injury, or a poor/unstimulating routine could be the real problem. You might need to consult a good saddler/horse chiropractor/dentist/... Also, sometimes a green horse will turn back when being ridden alone but not when with other horses.
I've known one or two horses that would try to avoid work just because they could. I don't have a magic formula but the following worked for us. You need to be consistent, and the rider needs to be confident and competent.
Never take the horse for an out-and-back ride, always do circular routes. That prevents the horse from anticipating the "turn-around" point and turning early.
When the horse starts to turn, instead of trying to pull the horse back to the right way (which the horse will expect), the rider goes with it and makes the horse turn a full circle, then continue forward. This might need to be done several times before the horse gets the hint, but I've found it easier than trying to wrestle the horse straight each time.
Don't reward the horse with immediate stabling/grass/feed when they refuse to work. Get some kind of "ride" completed if at all possible, even if it means walking around with the horse in hand.