Generally, yes.
On almost all airlines you can select/change frequent flier accounts as often as you want until check in.
Final selection typically happens during check in and most check in processes have an explicit or optional step explicitly for this.
travel.stackexchange.com/users/13971/Hilmar
In case you don't do it before the flight...
As alluded in other answers, pretty much all airlines allow you to "claim missing miles" even after the flight.
If the frequent flyer programme is for the same airline, then you usually do it online
and it's pretty straight forward
(I've done it quite a few times).
If it's a partner programme (e.g. you're flying on BA, but the FF is from American), then it'll be more hassle.
In either case, make sure to save your boarding passes - either electronic versions or printed/issued ones.
travel.stackexchange.com/users/14128/Aleks G
This is, as you say, airline dependent.
I know several airlines that do, and the best way for you to find out in your case is to contact the airline.
In your case I would also contact your university travel department and see if they will add a frequent flier number when booking.
travel.stackexchange.com/users/264/DJClayworth
I don't have first-hand experience with the airlines you mentioned, but any other airlines I have seen lets you add frequent flyer numbers at any time.
If you have the booking code and your name, you should be able to sign into view the reservation and add the frequent flyer number.
You can also have it added at check-in (online or in person) and sometimes even after the flight.
travel.stackexchange.com/users/58132/PhilippNagel
As already stated more than once, it is definitely possible.
However, you should check whether you have a contract saying that all frequent flyer benefits/points on university-paid travel belong to the university.
I have had a contract like that (though it wasn’t with a university).
travel.stackexchange.com/users/12555/WGroleau
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.
travel.stackexchange.com/users/43483/Jan
I had a similar condition where the company booked a ticket for me.
But while doing boarding, I asked the Airlines staffs to add credit on my frequent travel card as ticket was under my name.
In addition, I took a flight from Finnair and forget to add my frequent flier.
However, later I logged in to my frequent flier site and add the ticket number.
It takes 48 hours and once airlines confirmed, I got my credit on Frequent flier.
So as per my knowledge, JAL is in ONEWORLD
and you can easily on it.
Best of luck and have a safe journey.
travel.stackexchange.com/users/108067/Udhy
You should be able to do that on the airlines website once you have your booking code.
As a last resort, you can always get it added at the airport, even after you checked in.
Just make sure to do before the flight; afterwards is also possible, but a lot more tedious.
travel.stackexchange.com/users/37993/Aganju
In most cases, you can either add it during the check-in process or ask any departure-gate agent working for the airline, after check-in and passing security.
It doesn't necessarily have to be the gate agent for your flight, so you can go to a different desk (as long as it's the same airline)
if that helps even out queues.
Usually, this can also be done at a layover airport if you have one with sufficient time, but I wouldn't recommend relying on that
(tarmac holds can shrink even long layovers unpredictably!).
travel.stackexchange.com/users/31076/WBT
My university is responsible for booking flights on my behalf. I wanted to know if it's possible to add my frequent flier number and credit the miles to it after the flight has been booked?  Is it airline dependant? For this particular flight, the most likely choices are SIA, ANA or JAL
Is it possible to add a Frequent Flier number after the flight is booked?
travel.stackexchange.com
<airlines><loyalty-programs>
travel.stackexchange.com/questions/153382
travel.stackexchange.com/users/59499/Prada
It is possible to add frequent flyer numbers on most airlines, even after check-in, and to claim missing miles even after the flight. This depends on the airline. It can depend on the airline, but generally it is possible to do this on your travel date or retrospectively.
This is generally possible on the day that you fly and even afterwards. It depends on the airline but is generally possible.