The direct object of an active sentence is typically in accusative, an indirect one in dative.
An object in an active sentence is never nominative.
The verb esse (to be) is active but does not take an object.
When you say that something is something, aliquid aliquid est, both nouns are in nominative.
For example:
- Marcus dux est. (Marcus is the leader.)
- Giraffa alta est. (The giraffe is tall.)
The word order is relatively free, so such sentences could be interpreted the other way as well.
However, context tells which way it goes, and this is especially clear with adjectives.
It makes sense to say "The leader is Marcus." but "The tall is giraffe." (or however you would phrase this weird statement in English) does not mean much.
The word "necessity" in your sentence is declined in genitive: necessitatis.
The words crimen and mater are in nominative (although the accusative of crimen looks the same).
This leaves two possible translations as you suggest:
- Crime is the mother of necessity.
- Mother is the crime of necessity.
The word order suggests the first translation, and so does context.
The ambiguity between these two remains, but it is not a serious source of confusion.
It is typical — although not at all necessary — that the word in genitive is next to the word it describes.
Therefore it is more likely that necessitatis describes mater (mother of necessity) than crimen (crime of necessity).
But the ultimate reason to pick one translation is context.