The searches are designed to prevent drugs, mobile phone Sim cards and contraband being smuggled into prison and advocates cannot expect special treatment, according to the Prison Officers Association (POA) Scotland.
The comments come after the Faculty of Advocates complained to Justice Secretary Kenny MacAskill about lawyers being asked to allow an oral inspection, with calls for "an appropriate, legitimate and proportionate policy across Scottish prisons".
The issue was raised after Victoria Young, QC, was denied access to a client at Barlinnie Prison after she refused to have her mouth checked by a warden. She later described the searches as offensive and humiliating.
However, Andy Hogg, general secretary of POA Scotland, said the searches were essential to maintain security inside prisons, and said advocates should be supporting them.
He said that, while not knowing the specifics of Ms Young's case, an oral inspection may be requested if a visitor appeared to be chewing gum, or had something in his or her mouth.
Mr Hogg said: "Quite clearly, advocates should be treated no differently than anyone else.
"I agree that any search should be proportionate. That proportionality aspect would mean staff should not identify a particular group to under take the specialist search, as they do."
Mr Hogg said a major issue was the smuggling of Sim cards by prison visitors.
"If you consider the size of a Sim card then it is not inconceivable that it could be kept between the lips and the gum. The searches may be viewed as disproportionate, but these are the realities that we have to face every day.
"If there is a phone in the prison, it can have a long life if there are Sim cards being smuggled in.
"The advocates should be supporting the process that tries to prevent prohibited items, including drugs, from entering our prisons."
Visitors go through a metal detector on arrival at a prison, with their bag and any other belongings also checked. The outer layers of clothing may also be examined.
All security staff have the power to ask for an oral inspection, which does not involve the use of any implement. They do not have to state a reason for making the request.
It is understood that a main point of concern raised by the faculty is that not all prisons ask advocates to take part in such searches, leaving the policy unclear.
In 2006, lawyer Angela Baillie was jailed for 32 months for smuggling heroin and diazepam into Barlinnie Prison.
Ms Baillie claimed she had been coerced into supplying the drugs by a gangland figure.
Solicitor David Blair Wilson, of Dunfermline, is due back in court for a preliminary hearing on December 6 after being accused of attempting to smuggle mobile phones and drugs into Edinburgh's Saughton Prison. He denies the charges.
The Law Society of Scotland said solicitors generally accepted that searches were part of visiting clients in prison.
The Faculty of Advocate declined to comment further yesterday.
A spokesman for the Scottish Prison Service said: "The searches should be appropriate and proportionate and I am sure we will be happy to look at the concerns people have."