Lancashire firefighters rescued two people who were stuck in rising water on a narrow coastal lane.