If my server doesn't have a public domain name, and users access it via IP address, is using a self signed certificate (ignoring the warning) secure enough for https/ sftp? I am talking only from security standpoint, I understand the drawbacks of using IP address instead of a domain name. Related question: Is a MITM attack possible if users access via IP address?
No, that isn't secure.
The IP vs. domain issue is irrelevant, the problem is that you're telling users to click through the certificate warning. This means that an attacker can simply self-sign their own certificate and perform a man-in-the-middle attack, and the user will click through that.
If you control your users' systems, run your own internal CA and install your CA root on the users' systems. This is the industry standard method for implementing secure TLS on internal servers.
....is using a self signed certificate (ignoring the warning) secure enough for https/ sftp?
No it is not sufficient.
The problem is that by doing this, the users using this application or website are taught to ignore certificate errors. This alone is reason enough to state that it is not sufficient.
Man in the middle attacks will also display a similar certificate error to the users. Since they are used to ignore this message, the likelihood of a successful man in the middle attack is very high.