Yes a group of bony fish Syngnathidae can bear offspring or as you say produce offspring. This group includes Seahorses and Pipefishes. In some species the male have either a brood pouch attached to the trunk or the tail while in others the egg is attached to the trunk or tail where the female lays. Fertilisation takes place in the pouch or in water before implantation.
Here's two pictures :
1.Male seahorse with brood pouch and a slender female without a brood pouch
2.Male seahorse giving birth to a baby seahorse
Now coming to your question
why are they considered male and not female?
Though the males here bear the baby but the baby results from fertilisation of a sperm produced by the male (the same seahorse that is destined to bear the baby) and an ovum produced by the female (the other seahorse without a brood pouch). The sperm / male gamete producing individual is a male and a ovum/female gamete producing individual is a female. The provision of being able to bear a child does not change the sex.
Note: Seahorse is an oviviviparous organism i.e the fertilised eggs develop inside the parent's body until they are ready to hatch.
P.S. Brood pouch is a cavity outside the body of these fishes in which the eggs develop and hatch.