There was indeed a rule at one point that apps had to be written in C, C++, or Objective-C. This was allegedly implemented in order to ban cross-compilers such as Flash compiler[0]. Presumably they would either require the source code to verify this, or inspect the compiled binary for some identifying feature. However, these rules don't exist in the current version of the guidelines[1].
[0] http://daringfireball.net/2010/04/iphone_agreement_bans_flas...
[1] https://developer.apple.com/app-store/review/guidelines/