This is not only allowed, it's encouraged by legislation called the Bayh-Dole Act. The general thought is that there would be no incentive for anyone to do clinical trials on the drug, which can get quite expensive, if they don't have some protection for exclusive use. Many, if not most drugs proceed starting from academic research funded by governmental support.