If those are the correct criteria then, yes.
If Ireland fail to get a bonus point and haven't massively overtaken Scotland's points difference (which would probably be the case if they don't get a bonus point) Scotland and Japan can contrive a result that gets them both through. The interesting thing would be what would happen if early in the second half Scotland were no more than 7 points up and had scored 4 tries to get their own bonus point - would either side do anything to rock the boat? If Scotland push for a greater victory (which would achieve nothing, they'd be top anyway) they'd risk shipping a try or two and perhaps lose or draw meaning elimination. For Japan, sure they could push on to try to win or draw or get a 4 try bonus point themselves, but all they'd gain is a different quarter final draw but if while pressing they let Scotland win by more than 7 they are out.
Football got rid of this non-sense back in the 80s after the West Germany/Austria game in the 1982 world cup.