Turning off “auto” features may make things a little inconvenient. While it’s convenient for some things, it can be a simple way malware is allowed to propagate. This is the function that causes programs to run automatically when you insert a drive. Make sure any machine into which you plug your flash drive into has up-to-date security software and is running periodic scans.To avoid this in the future, I suggest you do two things. It’s important to understand that when you transfer a flash drive from one machine to another, it can carry malware with it. It’s a common mechanism some forms of malware use to infect other machines. Malware can be written to use USB drives to transfer themselves to other computers.
From the situation you’re describing, yes, you may have passed one on to a computer you used. USB thumb drives and flash drives absolutely can transfer viruses. First, getting malware doesn’t necessarily mean you’ve done anything bad.