Anything done in stockinette (knit one row, purl one row) stitch will curl, it's just the way it is...If you want to avoid the curling, you could add a border to the edges of the scarf...I don't know of a way to fix it after it has been knitted but if you're not too far along, you could rip it and start over this time adding a border at the scarf edge (by border, something like just the knit stitch for a few stitches or a seed stitch or something before you switch to stockinette).

__________________
--The member formerly known as Demonica

"You must be the change you wish to see in the world."
- Mahatma Gandhi