I agree with JPC. For one or two sts, not too far down in the pattern, you can work to the st, then slip the st off the needle and let it ladder down to the error. Repair the error as a knit st, so if you have to turn the work around to get to the knit part of the rib, do that. It's easier.
If it's more than one or two sts, take the work off the needles and rip back to a row or even two before the mistake. Then put the scarf back onto the needle one st at a time as you pull the working yarn out of each st. Don't worry too much about whether the st is twisted, you can always correct the twist as you re-knit the sts.