I think this is the right bit that corresponds with the text you quoted...
Extract from AN 5.17.6: Nirodha Sutta (Ending)
, The Gradual Book Of Sayings - Part III, p143
Then the Exalted One addressed the venerable Ananda thus:
'Is it possible, Ananda, that you can look on with indifference at an elder monk being vexed? Verily, Ananda, compassion grows not from (suffering) an elder monk to be vexed'
Then the exalted One addressed the monks, saying:
'Herein, monks, a monk who has achieved virtue, achieved concentration, achieved insight, may both completely enter the ending of the perception of feeling and may emerge therefore - this is so: if here among visible things he make not the gain of gnosis, he will verily go beyond the deva-community that feed on solid food and arise in a mind-pictured body, provided he enter and emerge from the perception and feeling - this is so'.
Thus spake the Exalted One; and when he had thus spoken, the Well-Gone arose and entered the dwelling.
If I've not typed out the right portion of text, or if you require anything before or after what was typed, please let me know.
"Do not force others, including children, by any means whatsoever, to adopt your views, whether by authority, threat, money, propaganda, or even education." - Ven. Thich Nhat Hanh
"Whether I were to preach in brief, Sāriputta, or whether I were to preach in detail, Sāriputta, or whether I were to preach both in brief or in detail, Sāriputta, rare are those who understand." (A I 333, Sāriputtasutta)