Transformerless power Supply - 24VDC, 120V AC and 230V AC
I want to know if it is possible to design a power supply for a
  circuit that can operate from DC and AC using the same input
  terminals.


Yes, this could be called an off-line switched-mode converter however, it is usually not a good idea to omit the transformer because: -


It offers protection to the low side voltage due to it isolating the dangerous live voltages
It offers higher power solutions




The above picture shows how it works. It should be noted that "AC line" can actually be a DC line input. The isolation transformer is in the block labelled "DC-DC convertor".

Another name for this topology is "fly-back converter". The bridge rectifier at the front end ensures AC and DC power inputs are adequately converted to fairly "steady" DC voltages.

If you have a good argument for not using a transformer then I'd like to hear it but, be prepared, it's unlikely that you will.