Not the flap, bleeding is deeper in the ear
It could be a few things. It could have simply scratched too hard, it could be an ear infection, or it could be ear mites. If the bleeding stops, it's likely the cat scratched itself too hard. If the ear is hot, and your cat won't let you touch it, take it to a vet. If you notice a lot of black gunk that looks like wet coffee grounds, it's probably ear mites, tiny bugs that live and breed in your cat's ear. Take it to a vet to be 100% positive.