The answer is no, but not only for the reason you suppose.
Each star probably does have a different chemical composition and hence a different spectrum. However, many stars have a very similar chemical composition, and those stars born in a cluster an almost identical composition.
Therefore stellar spectra whilst having the potential to be a unique identifier, are not currently measured with sufficient precision to make this possible.
However, another reason why what you suggest won't work is that by and large, we can only obtain spectra for stars inside a modest radius from the Sun, especially if the stars are near the Galactic plane. One could work in the infrared, but the spectra of bright stars are generally less distinctive in the infrared.
You could go with a database of positions, absolute magnitudes and spectral types and probably work out where you were if it were reasonably close to the Sun. Note this only works if you are transported quickly (in terms of stellar evolutionary lifetimes).
A better bet is to look at the positions of local group galaxies (e.g. the magellanic clouds, Andromeda), which will be in noticeably different positions. Also, globular clusters can play a role, because many of these do have distinctive chemical abundances and multiple populations and are distributed around the Galaxy and out of the Galactic plane.
The pulsars idea doesn't work at all because: (a) The radiation from pulsars is beamed into a small angle, so they would not be visible in the same way from another Galactic location. (b) By the time you had got to another Galactic location (unless faster than light travel is postulated) some pulsars will have turned off, all will have significantly changed their pulses and periods, since the total lifetime of the pulsar phenomenon is of order a million years.