Does Apple accept apps which has a simple HTTPServer or FTPServer for transferring files via wi-fi? I don't know is question silly but I couldn't find any answer. I am also an android developer and I built a file sharing application (for android) which allows two devices in the same wifi network to send files to each other. Actually the application acts like a simple ftp server and client. Files are sent over FTP.

Can I do the same thing for iOS? I heard AppStore has strict rules and I couldn't find anything about this in Apple documents?
Yes, I do believe you can include some or all of that functionality. Look at GoodReader's features, for example. It does wifi transfers, and it will connect to network shares. Some supported protocols include FTP, SFTP, SMB, AFP, etc. IIRC, I used a copy of it on my iPhone and a copy on my iPad to transfer files.

Good luck!