What you experienced is the correct behaviour!
Small Castle says:
Trash this or a Castle from your hand. If you do, gain a Castle.
Compare this to Cultist:
Every other player ...(not important here)
When you trash this,+3 Cards.
Cultist has a triggered ability that happens when you trash it. You know it has a triggered ability because it is "below the line" (which is a strong hint) and it mentions a condition ("When you trash this") and something that happens as a result of it ("+3 Cards"). (Other common triggered ability mention a time, often "At the start of your next turn" on Duration cards).
Cultist's triggered ability works if trashed for The Flame's Gift (the Boon you got), if you Remodel it, if you are forced to trash it via opponent's Swindler, it even works when you trash it with Lurker from the Supply.
Now compare this wording to Small Castle.
That doesn't mention a condition (or a time), it just flat out says "Trash this or a Castle from your hand." Because it is an Action card and the text is "above the line", it happens only when you execute the card by playing it. Then, it makes an additional effect dependend on the successful execution of that previous sentence, by saying "If you do, gain a Castle." This is also different from a triggered ability, which says "When you <do X>" or "At <time Y>".
Wordings are meant to be parsed by humans, not machines, so they vary a bit and one cannot say "It absolutely must have these words to make it a triggered ability". The most important sign of a triggered ability is that it describes a condtion/time and then says what should happen. In contrast, things that happen during a card's execution will directly state what is supposed to happen, then add a clause of "If you do" or "If you did" to make further effects dependend on the successfull execution of the previous effect.