The resources do have to be in your cultural borders, just like they have to be on land. You can "fish" whales, pearls, and fish. You "build" a well on oil. If the boat is in your cultural border and it is on the tile of the resource either a Fishing Net or Oil Well will appear in the "suggested command" box of the unit box in the lower left of the screen.