Surf fishing requires pretty specialized equipment. You want a long rod to heave heavy lures a long way over the waves and a long butt section to hold it against you as your fishing.
On a boat, such a long rod would be awkward to hold and use.
That said, if you really only can get one, you can get a 7' surf style rod to use for both until you get the $ for 2.
Best bet is to get 2 inexpensive rods and 1 reel. There's some inexpensive stuff out there that should serve you well.