You can absolutely mix salt directly into your aquarium! In fact, many aquarists do just that when they're first starting out. It's a simple and effective way to create a saline environment for your fish.
Just be sure to dissolve the salt in water before adding it to your tank. And don't forget to dechlorinate the water first!