Charity umbrella bodies said the guidance contrasted with that published earlier this week by the Charity Commission. It was criticised by lawyers and charity umbrella bodies as too prescriptive and likely to deter charities from campaigning at all in the run-up to the ballot.
The OSCR guidance says many charities will want to consider the possible implications of the EU referendum and "it may be appropriate for some charities to make their voices heard during the EU referendum process".
It says that, in general, charities can take part in the EU referendum debate if they can show: it is advancing its charitable purposes; the charity’s governing document does not prohibit such activity; it is not advancing a political party; and the charity’s trustees are acting in the charity’s interests, with due care and diligence.
The guidance says charities might feel it is appropriate to participate in the referendum process in ways that assess the impact on their organisation, or which campaign for policy outcomes or for the outcome of the referendum itself.
"Some charities may consider that one or other outcome of the EU referendum is likely to directly affect their ability to work towards their charitable purposes, either positively or negatively," the guidance says.
"They may therefore wish to campaign for or against an outcome in the EU referendum."
It says charities that decide to do this must be able to demonstrate that this is a way of achieving their charitable purposes.
John Downie, director of public affairs at the Scottish Council for Voluntary Organisations, said the guidance was helpful and was in "stark contrast" to that issued by the Charity Commission for England and Wales.
"It’s encouraging to see the OSCR recognise and embrace the vital campaigning role played by thousands of charities in Scotland," he said.
"The OSCR’s guidance will be helpful to third sector organisations wishing to influence debate in the run-up to the EU referendum."
But he said he would like to have seen more clarity on the fact that charities were entitled to take a position on whether the UK stayed in or left the EU.
Elizabeth Chamberlain, policy manager at the National Council for Voluntary Organisations, said the OSCR guidance contrasted with the Charity Commission’s, which she criticised earlier this week for setting the wrong tone and containing warnings that were not appropriate for regulatory guidance.
But she warned that although the substance of the OSCR guidance was similar to that of the Charity Commission, it could leave cross-border charities uncertain of whether they could become involved in the EU debate.
The EU referendum will take place on 23 June, with the campaign period for electoral law purposes starting on 15 April.