Don Harlow writes:
"While the particles anstataŭ (instead of) and krom (besides, in addition to) are generally classified (by analogy with their equivalents in Western languages) as prepositions, their behavior is more like that of coördinating conjunctions such as kiel. So many Esperanto speakers will add the -n ending to the objects of these "prepositions" when they coordinate with another word that has an -n ending.
EXAMPLES Mi amis ŝin anstataŭ li = It was I, not he, who loved her. Mi amis ŝin anstataŭ lin = I loved her, not him."
His analogy to kiel:
The ability to distinguish between subject and object via the -N ending not only allows greater freedom of word order, but also allows us, in some cases, to remove potential ambiguities when a coordinated noun's relationship to the original noun is either tacit or indeterminable. A good example of what this means is the sentence He treated me like a prince What does this mean? That he wined me and dined me? Or that he ordered my head lopped off? Well, all us native English-speakers know that the first is correct -- because the entire expression is basically an idiom, its meaning more or less free of the meanings of the words contained. Unfortunately, the meaning may be less clear to the non-native speaker.
In Esperanto, this sort of sentence is easily handled. In the first case
Li traktis min kiel princon where the -N on the end shows that the noun coordinates with "min". On the other hand, if we should (for some reason) wish to express the second case, we can use
Li traktis min kiel princo where the lack of a final -N shows that the noun coordinates with "li".
I'm confused by your example. I feel that you're trying to say there are two ways to interpret this:
He treated me like I was a prince.
He treated me like he was a prince.
Both work with "He wined me and dined me"; the first sentence meaning he treated me with the respect that he would give to a prince, the second sentence meaning he treated me with the generosity of a prince.
However, both also work with "he ordered my head lopped off"; the first meaning he ordered my death like a peasant involved in the overthrow of me from my role as the ruler of a country; the second meaning he ordered my death like he was the ruler of a country and I the peasant.
Either way, the idiomatic meaning isn't cleared up by distinguishing which person is being referred to as the prince.