If you don’t know a node’s position, you can’t interact with it—node objects can’t be acted on by identity. You can, in fact, have the same node object in your document multiple times, and different node objects with the same content are treated as interchangeable. Thus, the only way to address these is by document position, and you’ll have to find some way to get a position for the node that you want to change.
setBlockType is a command that’ll act on the current selection—probably not what you want here.
This is actually what I’m having troubles with: I don’t know how to find position of element under cursor. So, I’d appreciate any options and/or guidance.
Also, I’m not sure I understand about “same node object multiple times”. Could you please elaborate?