You needn't run in the swimming pool. It isn't allowed.
In this sentence, 'needn't' implies a lack of necessity, which doesn't fit the context of a rule or prohibition. The phrase 'It isn't allowed' indicates a prohibition. Therefore, 'mustn't' is the correct modal verb to express prohibition.
Corrected Sentence: You mustn't run in the swimming pool. It isn't allowed.