On my ride yesterday the rubber on my tyre seemed to rip away revealing the second layer of the tyre. I was wondering whether this would still be safe to ride on. Maybe the tyre is less puncture-resistant in that area but could still be used?
Normally safe is relative, in this case, its absolute - no, it is not safe. Don't ride on that tire. I would - but only to get home, and I would be feeling for any sign of further degradation (vibration etc). Every road bump would have me ready of a crash in the expectation it was the tire deforming, every corner would be taken as a speed suitable for jumping off the bike if needed.
The traction changes when the tire footprint from rubber to the threads could be enough to instigate a slide. The tire will only disintegrate further with more riding. The threads are what holds the tube in. When those threads get worn though (will happen sooner rather than later), the tube will push its way out the tire and either explode, or worse, ballon and jam between the wheel and frame, lock the wheel and leave you in a messy situation. The tube ballooning when you are cornering will lift the tire and could cause traction loss.
The only thing on your side it is it the rear tire, not the front.
No, this would probably not be "safe" to ride on. That "white stuff" looks like the casing threads(the T in TPI when you buy tires) that gives the tire its structural strength. You can even see the grooves where they used to lie diagonally in the rubber in the upper part of the damaged area.
Could you keep riding it, maybe, but I would not. There is no way to tell when it will suddenly cave in to the tire pressure, so I would not classify that as "safe".
Here you can see a tire with similar wear/damage, you only lack that elegant hole which will come soon enough if you keep riding it. https://commons.wikimedia.org/wiki/File:003_Bicycle_tire_worn_through_with_visible_casing_thread_-_mechanical_failure.jpg
I know from personal experience that a tyre like that fairly rapidly leads to a tyre that lets the inner tube reach the road, and that leads to a no air situation in pretty short order.
Mine went from having rubber over the threads of the core to having a hole in the inner tube within a ten mile ride... on good tarmac.
There's another aspect: Do you want to wait until you get a puncture, even when in the middle of a trip, or do you want to replace it proactively?
When at home you have time and tools, most likely, but when cycling you might not have.
Of course you could cycle uncomfortably "on steel" for a short distance as well (until you are home again)...