TL;DR: Yes and Yes
More detailed response to your two part question
This answer is for D&D 5e. Depending upon how important alignment behavior is in a campaign in another edition, you could apply this to other editions as well.
- A chaotic alignment does not require any creature to behave against its own self interest
- For a given task or situation, there is no requirement to make alignment the overriding factor in a decision by a creature or character.
- For a given task or situation, there is no requirement to change alignment if it seems outside of the normal behaviors of the creature or character.
Basic Rules p. 33
A typical creature in the worlds of Dungeons & Dragons has an
alignment, which broadly describes its moral and personal attitudes.
Alignment is a combination of two factors: one identifies morality
(good, evil, or neutral), and the other describes attitudes toward
society and order (lawful, chaotic, or neutral).
It can be argued that chaotic alignments trend toward self-interest being the overriding motivation of a given creature or character.
If we go by alignments, would a chaotic evil creature follow that order?
Yes, see two part answer below.
If yes, can it still be considered chaotic evil then?
Yes, see citations from the rules.
Basic Rules p. 34
... alignments describe the typical behavior of a creature with that alignment. Individuals might vary significantly from that typical behavior...
* Chaotic good (CG) creatures act as their conscience directs, with little regard for what others expect.
* Chaotic neutral (CN) creatures follow their whims, holding their personal freedom above all else.
* Chaotic evil (CE) creatures act with arbitrary violence, spurred by their greed, hatred, or bloodlust.
The essence of this answer is that role playing and appealing to the motivations of the character or creature as a real entity, not some two dimensional tool, is the best way to get a character or creature to do your bidding.
1. Your example of a summoned demon:
Any summoner has to establish dominance over the demon/devil, be it by power (magical effect) or by persuasion (you get this benefit if you do that for me) -- or a combination of both. It is in that second part that the puzzle to getting a chaotic evil, or any other chaotic creature, to follow your orders is going to firm up in cases where alignment is an overriding concern. It doesn't have to be, by default. (See the rules citation above).
2. NPC's/Other Monsters
Getting a generally undisciplined or erratic (chaotic) NPC or monster to do what you want it to follows roughly the same template, and also involves role-playing.
Establish the positional power/authority (you are the boss)
Know who you are dealing with.
Don't treat the NPC as a disposable tool.
Appeal to its self interest via both reward and punishment
- Apply the carrot and the stick, and make sure to make an example of
(punish) any entity that does not follow through. (This is with a campaign and a series of encounters in mind).
- If your reputation is that you reward getting the job done and punish failure, the next NPC you try to get to achieve a task for you will know the consequences of not delivering.