Translation:The dirty weasels live in the bedroom.
does the switching around of the subject and object change the declensions?
No. The whole point of cases is to show the noun's thematic role in the sentence, not its syntactic position.
The only reason "In the bedroom, the dirty weasels live" probably isn't accepted is because it's a weird way to say it in English. It's somewhere between poetic and archaic and no one says that in ordinary conversation these days.
Other way around. Whether it's subject or direct object or whatever (thematic role in the sentence) determines whether it's in the nominative or accusative or whatever (case form).
Whether it's "Mustelae sordidae in cubiculo habitant" or "In cubiculo mustelae sordidae habitant", each word still serves the same function and does not change case. "Mustelae sordidae" is still the subject (the who that's doing something) and therefore in the nominative. "Cubiculo" is still the object of "in" (saying where it's happening) and therefore in the ablative.
But yes, re-arranging the phrases within a sentence (to the extent that the grammar allows) tends to put the emphasis on different aspects. Because Latin's syntax is more flexible than English's, Latin can achieve the effect simply by re-arranging the words, whereas in English we need to add extra words to keep it grammatical, but it's essentially the difference between:
- He sat next to her. (standard--unmarked)
- She was the one he sat next to. (emphasizing who)
- It was next to her where he sat. (emphasizing where)