Pencil urchins would be ok, but not those with sharp points. Seahorse tails are tender and any cut/poke/stick could invite an infection if/when the seahorse comes in contact by hitching or dragging it's tail over the urchin.
I've kept starfish with seahorses without issue. As with all tankmates, keep an eye on what's going on in the tank and remove anything that is/may cause a problem based on your observations.
Tom