Can ailerons be used for pitch change in the event of elevator failure?
If the ailerons could be moved in the same way on both wings, the linkage between both is broken and they would float up near their maximum negative (trailing edge up) deflection angle. Even a hydraulic aileron booster would not help, since here still an interlink between both ailerons exists to keep actuation forces down. Only in a fly-by-wire aircraft with fully powered aileron actuators could the control system be programmed to allow symmetric deflection.

The effectivity of such a means of pitch control is very low, and only wing sweep can help to make it useable. Any pitch control input will change lift on the outer wing, and pitching up would mean a loss of lift and result in a plunging motion of the aircraft. If that happens on landing, when the pilot uses to pull the stick to raise the nose gradually, the resulting ground contact will be rather early and bumpy. Pilots of flying wings know this; they are very careful with their pitch control during a flare.

When an ASW-20 glider had crashed a couple of years ago because the pilot had forgotten to connect the elevator linkage, Gerhard Waibel flew to the glider club and demonstrated how to fly the ASW-20 with flaps for pitch control alone. The downside is a much reduced speed range and a high landing speed, because you need to reduce camber in order to pitch up, but it works. Since the flap span is higher than the aileron span, I would strongly recommend to rely on the flaps for pitch control when your elevator stops working if flaps are installed. They also do not need any modification to work as pitch controls since they are rigged to move symmetrically.

If the engines are mounted low or high, their thrust can also be used for pitch control. This was used on several occasions to bring an airliner down after all hydraulic circuits had failed.



EDIT:
Mike Dunlavey insists I should mention flaperons. He is right, they are possible with mechanical linkage only, but you will find them only on wings which have flaps anyway. All modern gliders with flaps will also move the ailerons in sync with the flaps.

But they are the worst choice for pitch control. For one, they are on the part of the wing with the smallest chord. Their lift change will go with the smallest pitch moment change of all controls except the rudder, so it would be much better to use the flaps for pitch control. That the ailerons do move with the flaps will have little effect. Besides, well designed flaperons will have less deflection change for a given flap change so the spanwise lift distribution will stay close to the optimum. This will make them even less effective than the flaps.

I choose not to mention them to make the answer concise. But I'm afraid short answers are not appreciated anymore.