Of course! Here is how I did it (though it is worth noting that I do not own Photoshop, and these tutorial images are themselves edited to show you how to do it in Photoshop instead of in the software I use):
In the layers panel, if you double-click on the right side of any layer, it should bring up the Layer Styles dialogue box. In that box, you'll find these Blend If sliders.

Since the background is brighter than the foreground, you can just clip out the brighter pixels by dragging the right portion of the top slider a little to the left, like this:

This will likely give you a pretty harsh, jagged edge. So to smooth it out a little, just hold the Alt key (Option on Mac) and click on that same slider. This will break it in half. Then you can move both halves to create a gradual transition from opaque to transparent.

(Again, do note that these images are edited. I do not have access to Photoshop. The exact positions of the sliders may not be ideal for these images.)
This is actually one of those rare instances where I am grateful to use Affinity Photo rather than Photoshop. In Affinity Photo, instead of these sliders, you get a graph, kind of like a Curves adjustment layer for the alpha channel! This is what my graph looks like for these images:

And the results!


(obviously I also had to remove the red spots, but I just did that by painting on them with white, since I was going to be removing the background anyway.)
Note that if you change the channel from Grey to Blue in the drop-down menu, the same trick can work beautifully for sky replacements!
(It is also worth noting that this method does give you a slight halo. To fix this, simply create a new Solid Colour Fill adjustment layer, and fill it with the colour you'd like your image to be. Place the solid colour layer above the main layer, then place the main layer into a Group (by itself). Then you can select the solid colour layer again, and press Ctrl+Alt+G to create a clipping mask and limit it to the alpha values of the underlying layer. Since the halo is not noticeable on a white or black background in this case, I did not bother, but you can if you'd like.)