You can use
Quiero comprar una medicina in Spanish. Nothing necessarily wrong with that (so discard option 1).
About option 2, you might be right, since you would say "I want to buy a book", and pluralize that with "I want to buy some books".
Imagine that you could be using that sentence when getting to the counter of the pharmacy and asking the pharmacist for a specific medicine or for help.
Quiero comprar una medicina. Fluidasa. Me la acaba de recetar mi medico para la tos.
The tint is that you would say
Hola, queria comprar unas medicinas que el medico me ha dicho que necesito.
Quiero comprar unos libros que necesito para el curso que viene.
A Spanish speaker would favor unas over algunas in that context, in spite of
algunas/algunos being a possible translation for
unos are usually interchangeable, although there could be subtle differences for choosing one or another in a specific context.
Also, I wouldn't over think the translation the computer gave you. Maybe there are more accurate translations (is not a exact science, like math), but I would say that the translation the computer gave you is not necessarily wrong. Just, could be different, such as
I want to buy a (specific) medicine.
Also, I remembered how it was for me when I was learning countable and uncountable in English, so I googled if there any tips about that difference between algunos and unos and I found this article. I hope it will be relevant and helpful.