It should be possible. Leather-back turtles are capable of being endothermic at will, as a function of activity and quantities of brown adipose tissue (very common in mammals, not so common in other animals).
Us mammals and birds OTH, we are endothermic but retain a high metabolic rate at rest. So in essence, those cute and big bad leathery boys of cold seas can flip a switch and go endothermic.
Bluefin tuna is also capable of being endothermic according to its needs. It has specialized "red" muscles at its core that allows it to regulate its temperature even when experiencing temperature swings that would stop a human heart.
I could see a mammalian-like being able to switch to a cold-blooded/ectotherm modus operandi when there's excess ambient heat.
Many mammals in Madagascar have developed the ability to go into torpor during the hottest days of summer. So it wouldn't be impossible to think a mammalian-like being being able to do that on command as well.
I don't think we see mammals having this ability to go ectotherm because the Earth has never given mammals regular drastic temperature challenges on a daily basis.
Imagine an Earth-like world with, say, a 72 hour day/night cycle causing many regions to go experience a 90F (32C) temperature swing from midnight to midday.
If the night extreme is in the freezing, but midday temperatures are what we consider "normal", probably mammal-like beings (and other beings for that matter) would develop the ability to hibernate on demand or have "anti-freeze" agents in its fluids. Some crickets in New Zealand allow themselves to be frozen at night.
OTH, if it is the midday temperatures that are extreme (extreme from our POV), then animals would/could develop on-demand ectotherm behavior (or go into a state of torpor.)
I think your hypothetical being to be quite possible.