You can, but you need to be careful that the growing of the roots does not make their way into your filtration or plumbing in any way.
I keep mangroves in my system, more for the challenge and cool factor than anything. You need to make sure you spray them daily with ro/di water due to them 'sweating' out the salt they absorb from the saltwater. If not done this can be deadly for the tree.
It is best that they are kept in a sump setup. They can either be planted or if you want the roots to be out, float them with some styrofoam.