Don't worry. Nothing will happen to you. If you are concerned, stick your finger in a small container filled with hydrogen peroxide, for five or ten minutes.
Onions often develop "black-mold". Just peel the outside layer off, rinse, slice and cook. The interior of the onion will not be infected. Anything is possible, but it is unlikely you will suffer any ill-effects from your cut.
Never ever use, touch or eat any food if it has MOLD. It is not worth-it risking your health. Please take very good care of yourselves.