Yes there are many very strong non RG universities.
in fact I would argue some of them aren’t RG because their research is so strong they don’t need RG marketing or money. Dundee, for example has one of the top medical/biological science research set ups in the world, yet aren’t RG. There’s a good story about a Dundee taxi driver that used to run guest lecturers from the airport to the uni, and got a little book for them to sign. Reads like a who’s who of top scientists.
i wouldn’t place too much faith in tables. Unis aren’t homogeneous, and all have different strengths and weaknesses. Ex-polys tend to be very strong in “newer” and taught courses, older uni’s are better for pure academics and if you want to follow that path.
st Andrew’s is generally thought to be alongside the Durham, Lancaster, Warwick unis. Just below oxbridge, but slightly above Manchester, Leeds etc.
st Andrew’s while small benefits from proximity to the other big Scots unis- Dundee, Edinburgh, Glasgow, Aberdeen. I only know the stem/medicine side but there’s a lot of collaboration and opportunity to work with other institutions.
if you’re after a small, highly regarded university St Andrews fits the bill.