Any songs you have downloaded will be removed from your devices when you cancel Apple Music. The music you purchased through iTunes can be redownloaded for free.