Some proteins can indeed be toxic. However, note that it is rare for a protein to be toxic.
Yes pathogens produce and secrete toxic proteins to invade their host. Bacterial toxin such as hemolysin A, neurotoxin, botulinum toxin, tetanus toxin, Shiga toxin are all proteins. They are strongly antigenic can elicit immune response.