There are a lot of different kinds of pipefish.... do you know the name of the one you're interested in?
Some kinds of pipefish need much larger tanks than dwarves live in. Also temperature may be a problem. From what I recal, pipefish need cooler temps (correct me if I'm wrong...)
Some types may be okay.......
Doryrhamphus multiannulatus (many banded pipefish).... but I dont know that much about them. Another option may be Doryrhamphus excisus (blue stripd pipefish) they only get to be 2-3 inches. Again, I dont know much about them and they may be aggressive..... Just some species to look into if you're interested.