So, this question has both a specific example, and a general question. I address both the specific case (the first two headings) and the general case (the rest of the answer). Unfortunately, the answer to the general case is there is no answer that applies generally. There is no one-size-fits-all, this-is-what-a-GM-should-always-do-for-every-situation answer to this question. Every response to unexpected effects has to be addressed on a case-by-case basis that is specific to the table, the characters, the game, and the plot. Ultimately, that's the only possible answer anyone can offer.
First, the spell explicitly bars you from doing that
This isn’t an ex post facto houserule designed to fiat away your ingenuity; it’s literally just enforcing the existing rule that prevents this abuse.
Second, the cleric cannot summon orcas
The dolphin creature has specific stats, including a size and weight. It is somewhat generic, using the same stats for many related species, but ultimately what relates them is similarities in size, strength, behavior, and so on. The orca, though genetically a dolphin, is anomalous in most of those regards, being much larger. It is not appropriate to use the dolphin stats for an orca, nor is appropriate to treat the ability to summon a dolphin as the ability to summon an orca in particular.
Pathfinder, once again, explicitly says this. The orca is a separate creature from the dolphin, and the spell gets you a summoned version of the latter.
Third, adjudicating unforeseen, breaking uses of magic is one of the DM’s primary roles
Magic in 3.x is often vaguely defined and phenomenally powerful. It is common for magic to have unforeseen consequences, often greatly in excess of the expected power level for a given level. The DM’s judgment of such situations is often one of the most important reasons to have a human DM, rather than a computer that enforces the rules.
The DM should make these judgments almost always on a case-by-case basis, and the goal should be consistency and fun. Is dropping a dolphin, or a whale, or whatever, on someone “bad for the game?” I cannot tell you; it’s your game. The Pathfinder rules suggest that Paizo considered it bad for the game. 3.5 had the same rule, so Wizards of the Coast apparently felt the same way. But that doesn’t mean it can’t be a good thing for your game. It’s a bit silly, a lot cruel, and potentially does way more damage than you should be capable of, but those things may not matter, or even may be good things for your game. That is up to your DM, who, if he’s doing things well, should be trying to make all of the players happy.
Everyone seems to have really gotten a kick out of the plan, be really amused by the idea. The DM quashing it may have seemed unfun. But I will point out that if this becomes a regular tactic, and you’re able to crush your opposition with it, that will possibly make the game even more unfun. It also may ruin the mood and tone, which may also make the game unfun. Or else the DM has to redo a lot of work, which is very unfun for him, plus it means that effort isn’t going towards new things for you, which again reduces your fun.
So a DM has to make a judgment call on whether the problems an unforeseen interaction causes outweigh the enjoyment people get from it. This cannot be answered in a generic way, as every situation has different pros and cons. A DM definitely shouldn’t ban all, or even most, unforeseen effects: that’s what makes the game fun and interesting, and is a major source of reward for the players. To lose that would ruin the game. But eventually a line does need to be drawn, where the clever tactic, amusing though it is, is just not a good fit for the game.
Specific questions
Just for the sake of actually addressing each of your individual questions, despite their myriad false dichotomies. Please note that this is nothing like an exhaustive list of potential remedies! There are probably infinitely-many potential responses to these sorts of issues, all of them with their pros and cons and their situations where they are appropriate and their situations where they are horribly inappropriate. Which recourse is chosen depends on the group, the game, the characters, the situation, the work the DM’s already done, the things that have happened already within the game, and dozens of other factors that are impossible to list exhaustively.
- The GM can ban the spell.
- But then the players lose the intended functionality of the spell as well. If it's a particularly relied-upon spell (e.g. healing or resurrection) then the players are at a disadvantage for being creative.
A DM can, and should, ban a spell that cannot be used in a way except those that are bad for the game. In 3.x, there are quite a lot of those in my opinion, but that’s for my game, not yours.
- And what about NPCs/enemies? Do they lose the spell? If not, the players are at a disadvanteage. If so, won't the NPCs be unbalanced due to losing a spell they relied on?
An NPC statted with a given spell can always be modified to use a different one. Banning a spell that has already appeared in the game is usually not a great idea unless you explicitly ret-con (which is, itself, an extreme choice to be avoided, but is nevertheless sometimes the right choice).
- The GM can (sometimes) make the act impractical. Using the above example, the GM can simply rule that the dolphins are small and weigh very little.
- But sometimes the GM doesn't have that kind of wiggle-room. If our cleric were, for example, to summon a horse then we'd expect it to be the size and weight of a regular ride-able horse. And other spells might be even more specific.
- If the GM does make a ruling, this exception to the normal rules could itself be exploited. E.g. if the GM decreed our summoned horse weighs very little ("and is now impractical to drop on enemies, ha!") but it takes up the same volume, wouldn't it be extremely buoyant? So we couldn't drop the horses on people, but we could (as an example) use them to run across water?
As it turns out, horses are rather good swimmers, and have often been used to cross water.
Anyway, these examples are poor; it’s hard to imagine situations where these would be a good solution. But you can easily come up with more reasonable examples. For instance, setting the specific species of dolphin that you can get with the spell, to bar orcas (which are, in reality, already barred but for the sake of argument), would work without much in the way of “side-effects.”
But even with good examples, DMs should be careful about making such changes, because yes, side-effects are possible. That doesn’t mean they should or shouldn’t make such changes, just that they should do it carefully.
- The GM can threaten alignment penalties, having allies forbid the act, etc.
- This isn't always an option. If the usage of the spell doesn't violate your alignment in any way other then being unusual then it would be unfair to penalize the player.
Of course it’s not always an option. There isn’t any “one-size-fits-all” answer to these sorts of questions; the solution has to be tailored to the problem. Sometimes, this is the best option. Other times, it’s a bad option, or even not an option.
- Similarly, if the spell defeats the evil dark lord, why would allies forbid it? A mildly nasty act (sacrificing a defenseless dolphin) is certainly preferable to risking the lives of the villagers.
The latter point is extremely specific to a given person’s point of view. There are a lot of people who do not believe, or even categorically deny, that the ends justify the means. Paladins, for an obvious example. Also, how mildly-nasty that sacrifice is depends a lot on point of view, too; as a celestial dolphin, in particular, has an intelligence score that puts it above that of animals (and dolphins, themselves, are on the relatively high end of animal intelligence in the first place), that makes it a lot more dubious to consider the sacrifice “mildly” nasty. And then there are druids and the like to consider, who might treat any animal as sacrosanct and untouchable.
- The GM can ban the use of the spell "in that particular way", or simply say "it doesn't work."
- This is a frustrating cop-out, and won't stop certain types of players from experimenting with what they can get away with.
I don’t see that this option, as opposed to all the others, is specifically a cop-out. Particularly in this case, where it’t literally already a part of the rules; that’s not a cop-out at all.
That said, yes, there is a risk here. The DM should be aware of that, and weigh that against the problems that he’s trying to fix by doing so. There is no categorical answer here; sometimes, yes, he will have to go with the frustrating cop-out for the good of the broader game.
- E.g. if our cleric can't drop dolphins from 100m up, can he drop them from 10m? 5m? 1m? Can he summon dolphins on top of a battlement and then push them off?
The rules state that a dolphin has to be summoned into an actual body of water, of a size large enough for the dolphin to fit in. Seems a pretty fair, consistent, and reasonable rule to me.