Yes, you can heat treat stainless steel if you have a controlled heat source that you can do an extended soak at higher temperatures than are normally used for carbon steels. Of course some of this will depend on the stainless steel that you are using. Stainless steels can also rather demanding to forge as many have very narrow working ranges and generally are not recommended for the beginner.
Doug