The object was discovered in a car close to the medical association's headquarters.
The 36-year-old prince's vehicle had to be redirected and police sniffer dogs were sent inside the building in Stockholm, while officers carried out extra security checks.
But the item turned out to be an air gun, according to Swedish news agency TT.
Air guns are not illegal in Sweden and no one was disciplined following the discovery.
The Swedish Medical Association is the country's union and professional organization for doctors.
The Prince was understood to have been on his way to hand out awards to medical students who are members of the body.
The news of the airgun's discovery emerged as Sweden was in shock following an attack on a school in western Sweden, which is likely to have made officials more jittery about security ahead of the prize ceremony involving the royal.
One teacher and a pupil have been confirmed dead following the incident, which saw a man wearing a knife entering the school carrying what police described as “several knife-like objects”.
Three others – including the suspect – remain in hospital.