For wholesale players: yes. If you're a retailer and you buy an electricity future and then only use half of it across your customer base, you sell the remainder at real time prices. And for generator, selling real time power is the entire business model.
For consumers: no, not generally. Some markets have schemes to sell leftover solar power at real time prices, but I believe these are being phased out. Both grids and markets are by and large not set up yet for full two-way markets between consumers and producers.
I believe Octopus Energy in the UK lets people both buy power and sell it back to the grid at time-dependent pricing, though I'm not sure how it works exactly and I'm pretty sure technically they're two separate contracts.
This is a good point. Markets sting when they skyrocket to high prices. But the sting is supposed to be matched bit for bit by the benefits-- incentivizing people to cut back when they should (something most people would only begrudgingly acknowledge as a benefit when it's happening to them, if acknowledge it at all), and incentivizing innovative behaviors to exploit it to make a quick buck.
I haven't heard much about that last part; like you said, it would be great if the market works such that on the margin a player can exploit that price to make a quick buck (by, e.g. rigging some kind of battery up before a storm that's coming and making bank off the arbitrage when the storm hits by emptying the battery back in to the grid). Now maybe the transaction costs or economies of scale or whatever make that infeasible-- if so too bad-- but it's worth remembering this is half the benefit of a market system.
I have solar on my house and in IL we get paid via "net metering": https://www.citizensutilityboard.org/illinois-net-metering/ . The idea is you size a system for your annual energy consumption, and then you don't pay for electricity for the year.
If you sold the power back for real-time pricing you'd need a much larger system than your annual consumption. Net metering basically lets you sell the power back at a retail price, not a wholesale price.
From what I understand there is a lot of variation in providers. As I understand SDGE's Net Metering policy(https://www.sdge.com/residential/solar/getting-started-with-...), you sell back power at retail prices only for the current month's billing cycle. Excess energy created within a billing cycle is "true-upped" at wholesale prices which can be applied to other month's billing cycles.
I would also be curious in how the Texas case works. Especially if the grid is down, would it be able to accept the energy you are producing?
The rules in Illinois are you net meter for the year. If you make more than you use in a year that is free power for the utility. If you want a different deal you need a contract with the utility (In general you need to be in the millions of dollars/year range to be of interest). In Texas it is more complex as each provider can give you a different deal for residential systems.
When the grid is down you can't sell power back. The whole system shuts down. Though if you have a whole house battery backup you can use that instead of the grid (if it is built for it - solar gets weird if you aren't using exactly as much power as you make so you need something to use or make up the difference).
For consumers: no, not generally. Some markets have schemes to sell leftover solar power at real time prices, but I believe these are being phased out. Both grids and markets are by and large not set up yet for full two-way markets between consumers and producers.