Burning moldy wood in a fireplace shouldn't cause any problems to your health as long as you don't have any allergies or mold allergies that affect your health more than others.
If you have severe reactions to mold then I wouldn't burn the moldy wood in the fireplace.
However if you don't have any lung conditions or other health problems then it's perfectly safe to burn some wood with mold on it in your fireplace and even in the wood stove or wood furnace.