There's this thing called second-impact syndrome, where if you get a second concussion while you still have symptoms from the first one you just die.
Ask your doctor, don't return to cycling too early if there is any chance you could hit your head again.
Riding on the trainer is a separate question, as your doctor separately about that.