You can get an STD from yourself such as if you're giving yourself a hand job.
If you stick your finger into your Vagina and it has the STD on it then yes you can get the STD into your body through your Vagina by yourself.
For example if you had your hands on a partner and they were infected with the STD and then your hand or finger is then inserted into your Vagina then the STD can be transferred to inside your vagina.
Also you can be infected with an STD and not know about it.
So yes you can get an STD even without having sex with your partner.
You need to practice safe sex and use Condoms and other things to stay healthy during sex and if you don't know your partners health history then be very cautious.
You could also get an STD from a toilet seat as well.