Yes. You can also hang a swing for smaller children off the bar, and many customers do so. The easiest way is simply to wrap the swing cables around the bar. The following customer photo explains the principle, using larch wood workout bars as an example turnstangen.de:
For larger and heavier children, it nevertheless makes sense to obtain proper A-shaped swing apparatus.
Otherwise, due to strong lateral forces, there is a risk that the foundations could become loose and the apparatus could begin to wobble.