Can I use a power supply to power a solenoid electromagnet?
Yes but it will not be very powerful (10%) compared to an iron core solenoid.

Ferrite cores have low saturation flux density as compared to Iron cores. ... Advantage of ferrite cores lies in their low eddy current losses (due to their higher resistivity) even at high frequencies used in SMPS where iron cores if used result into extremely high losses.

So the power supply will work to maybe 10V or 1 Ohm as long as stored energy is not  released back into supply.

One can superimpose a low frequency sine with DC current and measure the attenuation of 10% to define the max DC current at the threshold of saturation.  Such as a rectified sine from a transformer, with an active NPN or Nch load and big heatsink to define this max current as long as transformer has much lower DCR output than solenoid.

Then using Ohm’s Law choose Vdc average or RMS from rectified sine or your adequate DC power supply to drive Imax = V/Z(f) where Z(f)= 2pifL + DCR.  Current then rises at the rate to Imax after some time, dt with dI=Vdt/L.  After time t, the solenoid if current saturates the core, I will accelerate as L drops to 0 then current must be cutoff.  For steel this Bmax threshold is smooth, while for ferrite it is lower and sharply reduces L.

Therefor the current must be limited by the DCR (&lt;1Ohm) under Imax where inductance drops 10% or limited by thermal rise and thermal resistance ‘C/W.