I just used preparation H. I got a little on my hands and washed them. Is it safe for my baby to suck on my fingers?

Generally safe. Accidental exposures, happening infrequently p, with Prep H as you describe should be safe. However baby should be watched for any ill effect including vomiting or rash. Pl keep these medicines at a safe place and avoid unintended exposures.