That's best done with a table saw, but if you can perfectly position a straight edge guide parallel to the existing good edge, then a router and straight bit could be used to trim off the imperfection or non straight edge of the board to make it parallel to the good edge. Getting the straight edge guide positioned perfectly will be the key to how well this works. I would use my table saw and fence because it's much easier and faster to get the desired result.
Charley
Charley