Having search engine friendly urls such as the urls that are generated on this website when you post a new question will help a bit when it comes to ranking a website.
But you can still rank with a non friendly website urls.
I have a mybb forum that has non friendly urls that show up as showthread.php?tid=33564 and it ranks just fine for the keywords that are in the thread.