Can I straighten a 2x4 with just a planer?
In short, no. If your 2x4 is twisted or bowed, all planing it would do is cut the parts off that were not straight. You'd be left with something that would be unusable.

You don't need a fancy machine to straighten it, however. All you need is some room and some weights (i.e. bricks). Set it on a level surface with weight to hold it in place and weights to correct the curve. Eventually the board will straighten. It's time intensive, however.