Things like anemones, corals, and even some "higher invertebrates" do not have "brains." For a very long while echinoderms and cnidarians were considered closely related because of this and their radial symmetry. However, this is misleading. There is no doubt cnidarians react to stimulus but do not have a brain. Echinoderms such as seastars and brittlestars have a rather mysterious nervous system in that they display exceedingly complex behaviors (as well as sensory abilities), but they do not have a centralized brain as we know it. How they process this information is a mystery.
So in addition to defining pain, you must also define what you mean by a brain. If you mean cephalization - a "brain" characteristic of bilaterally symmetric animals like worms, snails, crustaceans (and humans) that is one thing. But it is not truly indicative of behavior, IMO.