Lenovo Warranty
Can I sell the original RAM and SSD if I replace them with my own?
Short Answer: No.
Long Answer: Lenovo repair team confirmed that if you upgrade RAM or SSD, you will need to keep and reinstall your old components before arranging any repairs, otherwise they might not repair it under warranty.
Check with your local repair center or authorized dealer, these things vary from country to country.