You can rap over it as long as there is no monetary gain from it. You'll need their permission for that. If not you are committing copyright infringement.
Only if that is expressed in their terms, simply uploading a video with you rapping over someone's beat is technically illegal. It's still distributing their work without consent. Best thing to do is get permission. They probably have a website that offers leasing options that they'll most likely redirect you to.
Notice I said no monetary gain. Youtube allows you to monetize videos. But you're right uploading to a video site is considered a public performance and would not be allowed.