Well technically yes, it does void the warranty..
You'll need to be super slick about it. You need to leave no trace of you opening it. So no fingerprints or smudges anywhere inside (so wear like gloves haha). Also, no signs of damage on the screws. And just to be ocd, put each screw back in where they came out of.
If you do need to take it Apple for warranty purposes, you need to put back the original ssd.
Make sure you get the right size ssd too.