Patrick Harvie also urged the Scottish Government to ensure its staff would not be prevented from criticising Mr Trump on personal social media accounts.
The question at Holyrood followed reports that Home Office staff have been warned not to post negative comments about the president on social media.
Mr Harvie asked External Affairs Secretary Fiona Hyslop what communication ministers have had with the UK government over any possible visit to Scotland by Mr Trump during his planned state visit to Britain.
He said: “It’s been widely reported that the UK government is considering moving the state visit to Scotland partly in order, apparently, to avoid public protest.
“Both governments must surely be aware that millions of people around the world, and certainly many thousands in this country, stand ready to oppose the Trump regime and everything that it represents and that if such a visit did come to Scotland it would be met with the biggest public protest seen in many years.
“Can the Scottish Government assure us that Police Scotland will do nothing to limit or suppress that legitimate public protest, including non-violent direct action where appropriate, and can the Cabinet secretary also confirm that they will not be following the UK government line of instructing their own employees not to criticise Trump on their personal social media accounts?”
Ms Hyslop said there had been no communication from the UK government regarding a possible visit by the president.
She said: “I think the people of Scotland have already made it clear their intention to stand in solidarity with those that are facing perhaps negative perceptions by the current US administration, and in relation to Police Scotland I certainly think that we in this country have a very good record of making sure that we can support freedom of expression in protest but we do so in a peaceful way and that should be policed accordingly.
“Freedom of speech must exist in lots of different forms and fashions and I think it’s regrettable if the UK government is trying to seek to gag its own members of staff.”