Given two objects of different masses which cannot slide, if I was to
accelerate the object supporting them: which would tip first?
In order for the objects not to slide, regardless of the acceleration, they would have to be permanently fastened to the supporting surface which would then make them unable to tip over. So instead of stating the objects cannot slide, we will assume they don't slide because the maximum possible static friction force of each object is not exceeded by the acceleration of the supporting surface (acceleration of the vehicle). (Note that if the coefficients of static friction are the same for the two objects, the lighter object would slide first).
That said, with reference to the diagram below, tipping will occur about point A if the clockwise moment about A due to the accelerating force exceeds the counterclockwise restoring moment about A due to the weight of the object, or
$$mah\gt mg b$$
$$a\gt g\frac{b}{h}$$
Note that it is independent of the mass, and thus independent of the weight of the object.
Hope this helps.