Yes you can, I have done that hundreds of times.  However if you report an issue with can be caused due to RAM, tech support may ask you to remove it prior replacing a part  i.e not posting, Performance issue, Freezing, Not booting So prior claiming warranty services insure you remove your RAM module  and confirm the issue is not due to third party  memory   
I bought inspiron 3515 ryzen 3450u recently, I want to take more performace since the only 8 g 2400hz stick cant handle 60 fps in left 4 dead 2, so I ask if I can upgrade by my own without lose warranty?  
Upgrade ram by my own can make notebook lose warranty?