Dummy speaks out.
43A1c: Dummy must not participate in the play, nor may he communicate anything about the play to declarer
Fair enough, but there is very little here on penalties (43B1: procedural penalty).
So go to 16B which makes clear this is UI.
Still OK - I have for example disallowed a claim because Dummy explained the claim rather than declarer.
Now to the tricky bit.
The contract is 4 Hearts. Declarer's play is "unusual".
Dummy: "Oh partner, you're not playing it in No Trumps are you?"
Declarer: "Yes"
At what point is Declarer allowed to know that the contract is a suit one? Do we wait until a ruff occurs (hence the lead will be in a different place)?
I appreciate it will depend on the facts, but are there any general principles / guidelines?
I can envisage some quite bizarre consequences
If declarer ruffs (believing himself to be throwing away), do defenders just wait, not telling him it's his lead (and why)?
If declarer tells an opponent "it's your lead", is it ethical for that opponent to lead knowing that declarer will follow and hence accept it?

Comments
I remember reading in one of GCH Fox's books (The Daily Telegraph book on bridge) where something like this happened - declarer made a claim and was told to continue playing in the denomination he thought the contract was in until something happened that would make clear it wasn't. (He was in No trumps, so he was told to play a suit and then 'ruff it') - 1979 Spring Foursomes.
Rules are slightly different these days of course, but it seems a reasonable principle.
With regard to your potential problems
1.) The defenders will have a duty to align their cards in the direction of the side that won the trick. Declarer will probably be surprised that both have done so. (In Mollo's books RR frequently 'discards' a trump on a winner in preparation of a trump-reduction play by mistake.) If they have 'won' the trick in the other hand then the opponents can accept the subsequent lead (Drawing attention to an irregularity is a "May" condition - failure to do so is not wrong.)
2.) I don't think is ethical - a player must not intentionally break the law, even if there is a penalty they might be prepared to accept. 72B1
It's surely analagous to a player not being allowed to be woken up from a misbid by partner's explanation. Hence the GCH Fox solution.
I would rule that dummy's question suggests a play - it suggests there are trumps and that declarer should draw some. I think the wording of Law 45F is sufficient to adjust.
So declarer cant draw trumps at all?
I can see the logic, and following that through there's no way declarer can be allowed to realise he's playing in a trump contract.
I've had partners play a suit contract as though it were notrumps before, but normally the thing that clues me in is that they run the entire trump suit rather than stopping once trumps are drawn.
At that point, there's no difference between trump play and notrumps, so if the incident described here happened in that situation, I would expect no action to be taken.
This implies to me that in the problem in the OP, the logical alternatives countersuggested by the UI likely include not drawing trumps and playing the entire trump suit, and so declarer should probably have to play whichever of those lines look better assuming an NT contract.
The details would be for the TD at the table to untangle. Which might be an unenviable task. If they weren't drawing trumps before dummy spoke they wouldn't be allowed to then switch and draw trumps. If, as ais suggests, they were in fact in the process of drawing too many trumps they may to finish running the suit.
I think I'd approach it a bit like the claim laws, looking for 'normal' lines of play in NT and ruling out those suggested by the actual denomination.