The hadith says that the Prophet ﷺ bought grain from a Jew in a contract where cash payment was to be made at a future date and he deposited his armor as a security for that.
I am not really sure why you think that being 'ruler of vast kingdom' precludes this, because the Prophet ﷺ did not collect or hoard wealth for himself rather he distributed and spent it among the Muslims and on the needs of the state. And his personal lifestyle was ascetic.
As for why not ask for help from a wealthy Muslim, scholars have suggested the following reasons:
- to demonstrate to the Ummah that performing such transactions with Dhimmi non-Muslims is permissible
- it is possible that a Muslim would refuse to accept payment for the grain out of his love and respect for the Prophet ﷺ and would make it a gift. So the Prophet ﷺ did not want to burden a Muslim and instead performed the transaction with a non-muslim who would accept payment or security without hesitation
- it is possible that at that moment no Muslim had a stock of the required amount of grain, while it was available with the Jew. So the Prophet ﷺ purchased it from the Jew.
قال العلماء: الحكمة في عدوله ﷺ عن معاملة مياسير الصحابة إلى معاملة اليهود إما لبيان الجواز، أو لأنهم لم يكن عندهم إذ ذاك طعام فاضل عن حاجة غيرهم، أو خشي أنهم لا يأخذون منه ثمنا أو عوضا فلم يرد التضييق عليهم، فإنه لا يبعد أن يكون فيهم إذ ذاك من يقدر على ذلك وأكثر منه، فلعله لم يطلعهم على ذلك، وإنما أطلع عليه من لم يكن موسرا به ممن نقل ذلك، والله أعلم
— Fath al-Bari