Pitch a basssample?

Is there a way to pitch a bass sample within cubase that preserves the length and without having any artifacts?

You could try Direct Offline Processing with pitch shift on the sample (right mouse click on the event, “processes” > “pitch shift”), and try some of the algorithms, maybe MPEX solo musical or elastique Pro pitch.
“Without artifacts”, well, at some point they’re inevitable with extreme pitch shifting…depending what you’re going for.