Note there are many factors you would need to be aware of with mixed gas diving and isobaric counter-diffusion (IBCD) is just one of them.
Basically, the speed at which gasses dissolve into body tissues is a function of the gas' solubility and the difference of partial pressure between the inspired (i.e. breathed-in) gas and the dissolved gas already in the tissue according to Henry's law. Say you switching to air during the ascent from a deep dive breathing heliox (which contains helium and oxygen only). Before the switch, you dissolved plenty of helium but no nitrogen into your tissues during the dive. After the switch to air, the inspired air contains no helium but plenty of nitrogen, so the dissolved helium will start leaving your tissues (off-gassing) just as the nitrogen starts dissolving into your tissues (on-gassing), this is ICBD.
Now, here's the issue with IBCD: the tendency of bubbles to form in the tissues is a function of the sum of partial pressures in your tissues, so if you are on-gassing nitrogen from the air faster than you are off-gassing helium then although the individual gas partial pressures may not ordinarily be enough for bubble formation, the sum of the two pressures in your tissues may rise to a point where bubbles start to form that can produce symptoms of decompression illness. This is known as "deep water bends" or "vestibular bends" since the first symptoms of this typically occur in the vestibular canal, and can lead to life-threatening nausea, vomiting and loss of coordination underwater. Even if you survive this, in severe cases it can leave debilitating and irreversible injuries.
IBCD is reduced by choosing gas mixes and switching depth carefully so as to minimise the difference in partial pressures when switching from trimix to air. Also, helium is much more soluble than nitrogen, so one should never switch from a high nitrogen mix like air to a high helium mix like trimix on ascent as the helium will rapidly on-gas much faster than the nitrogen will concurrently off-gas which greatly increases IBCD and its attendant risks.
But in the examples you stated I personally would do the dive on air and would not bother with the added complication and expense of trimix, although 45m is quite deep by recreational standards so I would build up to it gradually in consultation with an instructor and probably do a decompression course to make it worthwhile otherwise you will have very little bottom time.