It is always possible to add the Frequent Flyer number later.
The easiest place to do so (in my humble opinion) is when dropping off bags at a manned terminal. They will request to see your passport/ticket/boarding pass (assuming online check-in) anyway and you can just hand them your frequent flyer card additionally to get it entered.
If you are unlucky and don’t have the option of a manned check-in/bag drop-off desk, the next best option is probably at the departure gate although I haven’t tried that myself. Finally, most airlines offer a manage my booking form where you can, for example, request a specific diet or pre-order extras. Often, this will also have a field to enter your frequent flyer number and programme, typically as part of the passenger details.