Rashid, 27, who has played both one-day international and Twenty20, but not Test, cricket for England took eight wickets and performed well with the bat during England's recent 3-2 50-over series win at home to World Cup finalists New Zealand.
The 26-year-old Finn played the last of his 23 Tests in the 2013 Ashes opener at Trent Bridge but has worked his way back into the squad after suffering problems with his bowling action.
Pace bowlers Liam Plunkett and Mark Footitt, who did make the trip, were not selected in a squad captained by Alastair Cook for the First Test at Cardiff's Sophia Gardens starting on July 8, where England will begin their bid to regain the Ashes following a 5-0 thrashing in Australia in 2013/14.
All the 11 England players who featured in both Tests during the 1-1 drawn series with New Zealand were included for the Ashes opener.
More From This Section
======================
Rashid said he was looking forward to working with Bayliss, a former Sri Lanka and New South Wales coach.
"I haven't actually spoken to him yet, I got a little message from one of the selectors congratulating me, telling me I'm in the squad for the Ashes," Rashid told Sky Sports.
"(Bayliss is a different coach, positive coach, different mindset so I'm really looking forward to working alongside him and seeing what he's got to offer."
Rashid's selection appeared to put pressure on off-spinner Moeen Ali's place in the side.
However, Bayliss said it was possible that England could field two specialist slow bowlers depending on the state of the Cardiff pitch.