The short answer is that it is technically allowed, though, it probably isn’t a good idea. If you are publishing some sort of service you want to lock for specific things, obfuscation won’t do what you’d like, it’s pretty trivial for someone with the right experience to come in and figure out how to get around any sort of stuff you might have to prevent your service from running.
There’s no rule explicitly saying you cannot obfuscate code, but the better question is why would you want to? The important part of the product is it’s function; not necessarily the way it works. If someone were to copy your product, they’d just copy everything and reupload it under a different name.
Also, even if you don’t intend to put anything malicious into your code, you can’t exactly prove it.