All English and Welsh NHS “single-sex accommodation” policies (which are actually mixed-sex accommodation, because they include an annex which says that trans people must be accommodated according to their chosen gender) come from a single, governmental source (via an external lobby group), starting in about 2007.
When the Scottish govt devolved, it committed to “single-sex accommodation” across the NHS, as the undevolved UK parliament had done.
Devolution happened before the policies were written, but while movements to get them written were happening. I doubt highly that Scottish NHS trusts spent time developing their own, different policies when English ones were available (in fact, having read them, the wording is in the main identical to the English ones).
So, not Stonewall but similar, but with governmental approval (but possibly without much governmental oversight).
One of our intrepid auditors, @GreenAllOver, has been digging into the past.