With any pet you have to be prepared to accept that eventually and it is sometimes sooner rather than later they will pass away.
In saying this it definitely doesn't lessen the ache and loneliness we feel when this happens ,I have experienced it just last week in fact my lovely boy Haze the one in the top left of my signature passed away .
regarding your situation at present I agree with you to rehome her would be hard as she has lived her life with you for so long ,
you are so lucky and obviously must take great care of her as she is a healthy age for a budgie.
As she was used to having a friend if it were me I would consider obtaining another budgie, you are going to be extra busy with study so if she was left on her own when you are at uni, studying e.t.c. this would be hard for her.
Please don't feel I am pushing you, if you choose to rehome her I can understand your feelings. Take care and best wishes with your studies.