@izzythepush,
Not necessarily . . . not all ships would have a flag locker full of signal flags--in fact, one would not expect a merchant ship to have signal flags at all. Even naval vessels didn't always rely on flags. A common signal from one naval vessel to another would be a gun to leeward (the sound would not carry very far to windward) and the main topsail flapping free in the wind. The signal meant "strange sail in sight," and meant an unidentified warship which could be seen by the signalling ship, but not yet visible to the ship to which the signal was directed.
All sailing ships would have a carpenter, though, and running up set of wooden balls would be an hour's work.
EDIT: The "strange sail in sight" signal was often reinforced by the lining the rail with seamen pointing in the direction of the unidentified ship--a simple and unmistakable signal.