I am currently running a raspberry pi with a MQTT broker. But my problem is that I also want to use the raspberry pi to publish on the broker, for some microcontrollers to receive the message. I do not know how to utilise this. There's however a few ideas:
Yes, you can run both a MQTT Broker and a MQTT Client on the same device, you can even run 1000s of clients on the same device if you so choose to.
As for Python MQTT clients, the most popular is probably the Paho Python client available here: https://www.eclipse.org/paho/clients/python/
Or for devices the MicroPython client https://mpython.readthedocs.io/en/master/library/mPython/umqtt.simple.html (with it's github page here: https://github.com/micropython/micropython-lib/tree/master/micropython/umqtt.simple)
If you have problems with any of the libraries, ask a new question and include all the details about the problem, so that we have something to work with.