Yes she can buy whatever operating system she wants. The Internet is teeming with places that sell them but you have to beware you are purchasing from a legitimate seller. Get a ripped off copy of Windows and MS will wait until the seller has disappeared a few months later, and then bombard you with warnings that the OS isn't legitimate, presumably to make you the victim.
Might be worth your friend's while paying a bit more from a PC shop she can return to if there is a problem.
As for which OS to install, depends a lot on the PC. I had a heck of a job upgrading my woman's PC to Win7 and eventually had to pay a guy to help out. Since your friend's is second hand and not turned on for a while I rather think you might want to avoid the latest OS versions such as Win 7, see if you can get an XP installation to try.