As per my information "pleasure yachts" are not included into the IMO-Nummer-System, which came into force in 1987
As I understand it, it is indeed strictly-speaking true that non-commercial vessels do not have "IMO" numbers, basically because the IMO regulations do not apply to them. However, like fishing vessels, all sorts of non-propelled vessels, vessels of any type under 100gt, and inland vessels, which also fall outside the IMO's scope, a yacht can apply to IHS-Fairplay (previously LR-Fairplay) for a number. In practice, all vessels which meet IHS-Fairplay's criteria for inclusion in their database (and the printed Lloyd's Register) have a number in the IMO series, more correctly the LR/IMO series.
However, the Equasis database does not cover such vessels.
As Bjørn says, the Miramar ID number is just an internal Miramar unique ship data number, though for convenience, Miramar uses the IMO number or others derived from, for example, a British Official Number.