can you plant in just perlite?
Yes.
or is it better to add it to soil?
That depends on what you mean by "better"!
I'm sure there is a whole laundry list of "Pro's & Con's" for using Perlite by itself (as the only medium), here are just a few:
Pro's:
1. It is virtually sterilized.
2. Retains water well, when "dry". Retains oxygen well, when "wet".
3. It is virtually inert, so it lends itself well to hydroponic type systems/conditions.
con's
1. It is virtually inert, so it requires hydroponic type systems/conditions. As well as the added knowledge to make it all work!
2. It offers little support to mechanically anchor the plant in a proper manner.