Does Apple alow skiping major version numbers?
The current live App version is 2.7 and the new release would be 4.0
Reading https://developer.apple.com/library/archive/technotes/tn2420/_index.html it is not clear if the example above will be rejected (in spite of not being a good practice).
Apple only cares that you follow the same pattern, which in your case is x.x, and increment only, so yes, you can skip.
Expect to be questioned by users who want to know what they missed, etc. Try to provide a simple explanation in the 'about this update' so they won't worry.