The home side scored a winner on the hour through Ezequiel Ponce as head coach Carlos Corberan handed almost the entirety of his senior squad minutes while using two different XIs.
Ajayi and Dike have spent several months on the sidelines – though the latter did play stoppage time in Albion's final Championship game before the break against Stoke – as injuries blighted the opening to the campaign.
But Albion and Corberan have been handed a boost ahead of the Championship return at Sunderland on Monday week with the duo bagging an important 45 minutes of action.
Winger Grady Diangana was Albion's only senior player to miss out. Diangana is out in Spain with the squad but missed the friendly with what is believed to be a minor knock.
The pair were part of wholesale pre-planned half-time changes after the Baggies head coach named the same starting line-up that impressed in the 2-0 victory over the Potters last time out.
Albion and Elche, who are bottom and winless in La Liga, played out a goalless first half in which frontman Brandon Thomas-Asante had a goal ruled out for offside.
But Elche found a winner as Ponce lifted over substitute goalkeeper David Button in the second period to condemn the visitors to a warm-up defeat.
Another notable inclusion was youngster Ethan Ingram, the Baggies under-21 right-back, and a regular trainer with the senior side, who was selected by Corberan to join the training camp. Albion return to England tomorrow (Saturday) as eyes turn to preparation for the Stadium of Light trip.
Albion first-half XI: Palmer; Palmer, Bartley, O'Shea, Townsend; Yokuslu, Molumby; Wallace, Swift, Phillips; Thomas-Asante.
Albion second-half XI: Button; Ingram, Kelly, Ajayi, Pieters; Gardner-Hickman, Livermore; Grant, Rogic, Reach; Dike.