If I use Mars with only 1 card left in my deck, can I still discard a random card from my opponent's hand?
Yes, as long as you can draw at least 1 card you get the other effect. Of course if you can't draw any cards, you can't play Mars.
Source: Ultra Prism FAQ (2018-01-19), TPCi Rules Team (2018-02-01)

Relevant cards

Note: All applicable cards may not be listed below.
SM5_128
SM5_154