You can do it at the beginning of the row--use a knitted or cable cast-on. You'll have to work those stitches next, so technically they are at the end of the previous row.
That's what I always do. If a pattern says to cast on at each end, I cast on at the beginning, but knit them, and then cast on at the end. I don't really think there's a better way to do it, and it really doesn't make a difference in the end. We're talking two stitches. No pattern will be bothered by two 'extra' stitches.