The mold on bread can be different species of mold and sometimes the penicillin type of mold does grow on bread while other times the moldy bread may have mold that is not the penicillin kind and may be harmful for you to eat.
However if you accidentally ate just a small bite of bread that contained mold then you likely will not get sick from it because you'd have to ingest more than that to make it a health issue.
Still eating moldy bread should not be done and if you do have moldy bread you should throw it out because it can contain other bad bacteria even if it does contain some penicillin mold.
The penicillin mold is healthy for you and can help with sickness but you should not eat moldy bread for it as you could become sicker.
If you need penicillin you should get some penicillin pills or get penicillin shots.