Yes, you have two possible rational canonical forms given the information you have. Both the matrices you wrote have minimal polynomial $(x-1)^2$ and characteristic polynomial $(x-1)^4$.
However, what you wrote regarding finding the rational canonical form is not correct. In general, you cannot determine the rational canonical form of a matrix only from the minimal and characteristic polynomials as your example clearly shows. You need to know the whole set of invariant factors of which the minimal polynomial is only one of them.
To justify that $A$ has one of the two possible canonical forms above, let $a_1 \, | \, a_2 \, | \, \ldots \, | \, a_k$ denote the invariant factors of $A$. The highest invariant factor is always the minimal polynomial so $a_k = (x-1)^2$. The characteristic product of the matrix is the product of the invariant factors so we have a priori two options:
$$ a_1(x) = (x-1), a_2(x) = (x-1), a_3(x) = (x-1)^2, \\
a_1(x) = (x-1)^2, a_2(x) = (x-1)^2. $$
The first option corresponds to your first matrix and the second to your second option. For more details, see section 12.2 in Dummit and Foote's Abstrat Algebra.
For a matrix $A$ the invariant factors are determined by finding the Smith canonical form equivalent to $(xI - A)$. Let's say $$S(x) = \text{Dg}[1,\ldots,1,f_1(x),\ldots,f_k(x)]$$ is the Smith canonical form. As mentioned elsewhere $f_1(x),f_2(x),\ldots,f_k(x)$ are all monic and each lower index monic polynomial divides the following. These are the invariant factors. (Also note that $f_k(x)$ is the minimum polynomial)
Now, it is true that $A$ is similar to Dg$[C(f_1(x)),\ldots,C(f_k(x))]$ where $C(f_i(x))$ indicates the companion matrix associated with $f_i(x)$, but this is not the Rational Canonical Form, to the best of my knowledge, not according to my textbook anyway.
The rational canonical form is derived by finding the elementary divisors of $A$. Take any invariant factor $f_i(x)$, then we can write it as $p_1(x)^{ei1}p_2(x)^{ei2}\ldots p_t(x)^{eit}$ where the $p_i(x)$ are distinct, monic and irreducible. These are then the elementary divisors of $A$. The rational canonical form is constructed from these elementary divisors as $$\text{Dg}[\ldots,H(p_1(x)^{ei1}),H(p_2(x)^{ei2}),\ldots,H(p_t(x)^{eit}),\ldots]$$ where $$H(p(x)^e) = \begin{bmatrix} C(p(x)) & 0 & \cdots & 0 & 0 \\
N & C(p(x)) & \cdots & 0 & 0 \\ \vdots & & & & \vdots \\ 0 & 0 & \cdots & N & C(p(x)) \end{bmatrix}.$$ Here $N$ is a matrix that is all zero except for a 1 in the upper right hand corner, and the companion matrix $C(p(x))$ is repeated $e$ times. This is known as a hypercompanion matrix. Note that the rational canonical form reduces to Jordan canonical form when the field is algebraically closed.
Let's look at an example: suppose you have invariant factors $f_1(x) = (x^2 + 4)(x^2 - 3)$ and $f_2(x) = (x^2 + 4)^2(x^2 - 3)^2$, and suppose the field we are considering is $\mathbb{Q}$. Then the elementary divisors are $(x^2 + 4),(x^2 - 3),(x^2 + 4)^2$ and $(x^2 - 3)^2$ and so the rational canonical form is $$\text{Dg}\left [ \begin{bmatrix}0&-4\\1&0 \end{bmatrix}, \begin{bmatrix}0&3\\1&0 \end{bmatrix},\begin{bmatrix}0&-4&0&0\\1&0&0&0\\0&1&0&-4\\0&0&1&0 \end{bmatrix},\begin{bmatrix}0&3&0&0\\1&0&0&0\\0&1&0&3\\0&0&1&0 \end{bmatrix}\right ].$$
My source material for this theory: CG Cullen, Matrices and linear transformations (2nd edition), the chapter named: Similarity: Part II. There are more examples and in-depth discussion there...
Best Answer
If the first matrix is the rational form of $A$, we should have $\dim \ker (A - I) = 3$ (because this is true for the rational form and so it should be true for $A$ as well) while if the second matrix is the rational form of $A$, we should have $\dim \ker(A - I) = 2$. Just check which of those two options holds for $A$ by computing the rank of $A - I$.