Hi,
I'm currently at St Andrews.
It depends on your budget and your definition of isolated i.e. how far you are willing to travel and what for. The town can be expensive if you eat out a lot or go to the coffee shops often (the coffee shop in the student union is cheaper than others). For groceries, there is a small Tesco (expensive so try to avoid it), a Morrisons, a small M&S, and an Aldi. Set your budget and shop around.
Living on campus means you can walk to lectures and the main town is only a 10-15 walk (the main Library is in town but there are libraries and computer labs on campus), which limits the need for transport. Sometimes I study on campus and other times I go to the libraries in town - both are excellent.
In terms of isolation, Dundee is about 11 miles (I believe the bus service is good but I don't use it) and Edinburgh about 1 hour. There is the night bus that helps ensure students get home safely after a night out. Again it depends on what you mean by isolation. The workload at St Andrews is very demanding so I'd say most students stay within the town and perhaps venture outwith it occasionally. Except for Dundee as there are students who prefer to stay there and commute everyday.
There are a lot of international students and perhaps there are students from privileged backgrounds but I would not see this as a barrier to enjoying your time here. I'd say St-Andrews is what you make it - the faculty and associated services are approachable and very helpful. The University associations and clubs are wide ranging - of course this depends on your interests.
For me, it was the best decision and I love it here.
Hope this helps.