Interesting question and one in which I would have answered yes prior to a meeting at a LFS the other night. They had a number of longnose hawkfish that looked a lot larger than would have imagined one getting. Now that I look into them I see they can get up to 5" so this must be taken into account when placing in your 24 gallon along with a sixline.
Here is a little on them:
Good tankmate choices include Dwarf Angels (as long as they're not too small), Pseudochromids/Dottybacks, most Damselfishes, larger Gobies and Blennies, mid-size wrasses, Butterflyfishes, Anthias, Clownfishes... Mid-temperament and sized fishes overall... as well as invertebrates other than mouth-sized crustaceans and worms. Again, due to their at times territorial nature, Hawkfish should be the last placed specimens in a collection.