Based upon what you have written about there is nothing illegal per se to arrest a person under her married name and release the same person on bail under her maiden name. The concern is that such a practice could be deemed a bit on the sloppy side.