The definition of subject says: the part of the sentence which names the person or the thing we are speaking about is
This is a bad definition.
Verbs are words that describe actions. A subject is a property of a verb, and it describes who or what is performing the action. (Objects come after the verb and describe who or what is the recipient or target of the action.)
Sometimes what we care about in a sentence is not the person or thing performing an action. However, English demands all sentences have a subject and a verb, and if it's not explicitly stated then heavily implied by surrounding context. So the subject needs to always be there even if you don't care about it, and it usually comes before the verb.
@Colin Fine puts it very well, the subject is not determined by the meaning or what the speaker/listener consider important (semantics) but by the position in the sentence and relation to other words (syntax).
However, with your examples I'm not following how you are having trouble:
Stone walls do not make a Prison. ("Aren't we talking about Prison here?")
No, this sentence is about stone walls and what they are not capable of making.
We cannot pump the ocean dry ("Aren't we talking about oceans here?")
No, this sentence is about "us" and our inability to pump an ocean dry.