I would like to print edible cookies or ornamentation for a cake.
Is printing with edible materials achievable by standard thermoplastic-like 3D desktop printer? Or you need to buy a special printer to do that?
You can, but that doesn't mean it's very easy.
You don't have to buy a special printer, but you need a special extruder (such as http://www.structur3d.io/). Most of these systems can print anything with the consistency of Nutella. However, many parts of the printer may not be food safe.
Another option (if you simply want 2d designs) is something like the PancakeBot. It can probably also "print" with anything that has the same consistency of pancake batter.