There is a difference. In Spa, Rosberg was fed up of Hamilton's behind-or-crash racing, and decided he wasn't going to take any more, leaving his wing in when he could have elected to relent.
In Budapest, Ricciardo was (in the broader scheme of things) an irrelevance to Rosberg - he was 130 points down in the Championship. Rosberg was not in a position of frustration with a title rival he felt was being unfair, he was in a position of opportunity with Hamilton way down the field. While in terms of the rules and regulations and the stewards, Rosberg had no responsibility to Ricciardo, Rosberg's responsibility to his own title chances, and the space that was available at a reasonably wide turn, dictate that Rosberg should have left him to it.
Obviously, Ricciardo ultimately made the clumsy move, but we're getting into that dodgy territory of dissuading drivers from attempting overtakes again - someone has to toe the line of brave and stupid if we're to get any excitement.