The simplest answer is a blanket no, do not supply a 12 V load and a 24 V load from two 12 V batteries in series.
However, for appropriate loads, and/or if you are careful to manage the batteries, it can be done.
The problem is battery balance. The 12 V load will drain one battery more than the other. This one will run out first. If you are monitoring the total 24 V to detect end of charge, then the first battery will be over-discharged.
12 V lead acid batteries in series tend to self balance when charged, because they can accept an indefinite period of over-charge, if the overcharge meets the battery specifications. For a wet cell, you can fast overcharge, but have to top up the electrolyte. For a gel cell, this means meeting a voltage limit, while the overcharge current drops to a very low value. With series connected gel cells, if you need to even out a severe imbalance, it could take weeks for the low value of current in the charged battery to fully charge the low one.
a) If you are going to charge the two batteries separately, and monitor both batteries for individual end of charge, then go ahead, and use whatever loads you like.
b) If the 24 V load is big, and the 12 V load is very small, then you can probably get away with monitoring the whole battery on both charge and discharge, as the imbalance will be very small.
c) If the situation is somewhere between those two, then you'll need to think about whether you run the risk of damaging the battery also supplying the 12 V load by over-discharge every time you use or charge the batteries. Is that something you want on your mind the whole time?
A good solution for a modest 12 V load is to run it from a 24 V to 12 V DC-DC converter.